「WP related」カテゴリーアーカイブ

wp migration/copy inside lolipop site

copy norikoguide.pepper.jp/en ->  norikoguide.pepper.jp/tgnwork

1. Use old FFFTP on old NEC xp.;  copy all files from /en/   to  /tgnwork  @17/10/27

2. Duplicate database with different prefix.; Time limitation at Lolipop is inconvenient, so that database is better exported to home debian;  manipulating at debian-home: tables with wp1_ prefix are duplicted to tables with wp1c_ prefix; then import into original database@lolipop.

2.1. export database LAA0242974-f1qyds @norikoguide.pepper.jp :Note: in zip (important!)

2.2. import into database wpkiyoshi (wpnakym)( this serves as working database) @192.168.0.17

2.3. on wpkiyoshi(wpnakym): delete tables other than wp1_ , then change prefix wp1_ to wp1c_, then export it.

2.4.  import exported working database into original database LAA0242974-f1qyds @norikoguide.pepper.jp

3.

 

WordPress Could Not Create Directory

1. Web Server Ownership
The first level is actually to make sure that your web server has ownership over the directories:
chown -R www-data:www-data your-wordpress-directory

2. Directory Permissions
The second level is also required – you must make sure that the directory permissions are properly set:
sudo find /var/www/wordpress/ -type d -exec chmod 755 {} \;
sudo find /var/www/wordpress/ -type f -exec chmod 644 {} \;

I’ve found that most solutions posted on the web show part two but skip the first part.

Permalink change to Post name→Home page “not found” in WP site not in the root directory

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

# BEGIN Lolipop [ http://lolipop.jp/manual/blog/wp-htaccess/ ]

<Files wp-login.php>
ErrorDocument 403 /lolipop_service_documents/wp-login-deny.html
Order deny,allow
Deny  from all
Allow from 175.108.112.111
</Files>

# END Lolipop

—————

Modification in .htaccess

——————————————————

RewriteBase /   → RewriteBase /en/

RewriteRule . /index.php [L] → RewriteRule . index.php [L]

———————————————

Moreover in Menu→Home→URL:  http://tokyoguide-noriko.net/en/

→ http://tokyoguide-noriko.net/

Also yo may better to check the permalink of the actual Home page.

Whole modification will make:

http://tokyoguide-noriko.net/en/  : not found

Post order

<?php
$args = array(
‘post_type’ => ‘kyoto_courses’,
‘taxonomy’ => ‘courses_kyoto’,
‘term’ => ‘kobe-standard-tours’,
‘orderby’=>’title’,
‘order’=> ‘ASC’    ); ?>
<!–<?php query_posts( $args ); ?>–>
<?php get_posts( $args ); ?>
————————————————-

Note that default is:  ‘order’=> ‘DSC

( Also default: ‘orderby’=>’date”)

leading blank line in .htaccess

Never!!

With this blank line, permalink to default will cause “not found”.

Correct .htaccess when the permalink is %postname% will be rewritten to almost blank .htaccess when the permalink is set  to default, and will be written back to the original file when the permalink is reset to %postname%.