Somehow it was activated at tokyoguide-noriko.net/norikoshop. This caused a disability of the edit, remove of caustom taxonomy terms. The deactivation, removal did’t change the status. After reinstalling the wordpress, the trouble went away.
月別アーカイブ: 2014年5月
Disabling strict standards error report
1. Put the following php file in wp-content/mu-plugins/errorreporting.php
———————————————————–
<?php if (WP_DEBUG && WP_DEBUG_DISPLAY)
{
ini_set(‘error_reporting’, E_ALL & ~E_STRICT & ~E_DEPRECATED);
}
?>
————————————————————
worked fine!
customize wptest towards japantourguide
1. Breadcrumb-trail was omitted.
2. footer.php: just includes our copyright.
3. footer-japantourgide2.php: includes privacy-policy, terms-and-conditions, and Mr.Murakoshi and Tagline. This is included only in Home page.
4. Tagline (‘description’) is omitted from the header (brute force) so that only site title is present in the header.
5. adventure: style.css: .header: top: 0->4em
This is not good because the sticking of main menu becomes deteriorated.
Lowering of the header was successfully realized by the modification to the .header in the css. (see aux5.css)
6. logo is inserted in header.php
WordPress Migration: almost best
1. In source site, save the database using phpmyadmin.
1.1. In phpmyadmin, -> データベース -> relevant database (wpdb) -> エクスポート -> 詳細 -> select relevant tables -> 実行 : source.sql
In selecting the tables, you need prefix of tables, which can be found in the wp-config.php of the wordpress now exporting.
You need to remember this prefix when importing the database to the target site.
1.2. Xport the files: ftp dump whole “wp-content” to the PC. FFFTP is convenient.
2. In target site:
2.1. If the target is multidomain site, check the database prefix used for those.
2.1.1. If none of them uses the prefix of the one used in the source site, simply import the source.sql using phpmyadmin of the target site.
2.1.2. If there is a site which uses the same prefix of the source.sql, you have to remove the tables related to that, which means that site must be killed, and then import the source.sql, which means source site wil be migrated to this site.
2.1.3. If none of the target sites is using the same prefix as that of the source site, you can safely import the source.sql.
2.2. Prepare a directory for the target site.
2.2.1. If the directory or wordpress site which is assigned the above prefix does not exist, create a directory and dump, not install, new wordpress files and directories to that directory and then remove “wp-content” from that directory.
2.2.2. If the prefix is assigned to the already existed and removed database wordpress directory, remove the “wp-conten” directory from that directory.
2.3. Edit “wpconfig.php” in that directory so that the above mentioned prefixed database should be used.
2.4. Place searchreplacedb2.php (renamed knsecret.php) in that directory and visit that file (e.g. http://newsite(/newdirectory)/knsecret.php)
2.5. Follow the instruction:
replace source_url (e.g. 192.168.0.16/wptest)
with target_url (e.g. norikoguide.pepper.jp/norikoshop).
Note: leading “http://” should not be included, nor trailing “/ “.
3. You visit the new site. It would be all right as the old site. Finally don’t forget to remove “searchreplacedb2.php” (knsecret.php). To avoid the danger of cracking.
WP Multibyte Patch Plugin
This plugin for japanese environment enhancement is very dangerous. Once activated, it may mess up everything, moreover deactivation cannot recover the original states. You have to reinstall the wordpress. To reinstall wordpress, the procedure described in the previous post “Downgrading wordpress” is very convenient. It recovered everything.
wordpress downgrade
1. Prepare some version from archive wordpress.org
2. In the root deirectory of the site, delete “wp-admin” and “wp-includes” directories.
(FFFTP is convenient)
3. ftp all the directories and files except “wp-content” folder.
(You should not delete .htaccess naturally.)
(You shoud not delete wp-config.php naturally.)
(wp-config.php would not be replaced, because native wp module should not have it.)
norikoguide.pepper.jp/trial Reconstruction
1. database table_prefix = ‘wp2_’
2. wordpress database reset. On the screen, it says it remove such and such, but actually basic items remain in almost all of the relevant tables. For example, wp2_options has 114 lines, of which first 3 items are url, blogname, blogdescription (seems corresponding to tagline).
3. Install Custom Post UI. Set custom post type, custom taxonomy exactly as the source site.
4. For the sake of safety, install Plugins activated at the source site.
5. Settings->media-> uncheck organize uploads into month and year folders.
6. Using lolipopFTP, remove /trial/wp-content/uploads.
7. Settings->permalinks-> Post name.
8. In the source site; export; saved.
9. At the target site; import; most of the media was unsuccessful.
I switched to Browser on xp and import again,; unsuccessful again.
Changed internal links by searchreplacedb2; seems worked ok.
I xferd Adventure-child directory through FFFTP.
Finally I realized it is because of limit on lolipop data import.
I ffftp the upload directory,
Now I can see mdia, although menu setting etc. were not imported. Each page seems correctly connected to template.
10. Many flaws.
10.1. lost internal links here and there.
10.2. Many items trippled, probably because I imported three times.
I corected them in menus. But custom field triplets for Home, Kamakura, Tokyo are serious problems, which I cannot solved yet.
Small thing: Topics sidebar must be on category page as well as posts page.
Permalink at 192.168.0.16/wptest/
1. This site was constructed:
1.1 Prepare custom post, custom taxonomy using CPT UI, vacant upload directory with unclassified setting.
1.2 Import the exported xml file from japantourguide.net
13. Rewrite internal links with searchreplacedb2.
1.4. Seemed worked perfect.
2. But it gives page404 when changed to default permalink setting.
Some pages are ok with the url/wptest/?p=**, but some pages shows page404 with the url/wptest/** (without page number id).
It seems he changed permalink setting to custom type in the timecourse of development.
.htaccess at lolipop
1. .htaccess at root directory (e.g. norikoguide.pepper.jp/)
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /norikoshop/index.php [L]
</IfModule>
# END WordPress
is effective onWP at child directory (e.g. norikoguide.peppere.jp/en/)
Note!! Rewrite Base /
Without this, you get Page 404 when changed other than default, although it says permalink strucure updated on the dashboard.
wptest work(2)
1. Refine templates as simple as possible.: Consider the template hierarchy.
1.1. Edit “page.php” and “single.php” : exclude date, author and comments.
1.2. Prepare “footer-japantourguide.php”.
<?php wp_footer(); ?> : makes the main_navi sticky.
2. How to display current taxonomy name:
<?php
$term = get_term_by( ‘slug’, get_query_var( ‘term’ ), get_query_var( ‘taxonomy’ ) );
//echo $term->name; // will show the name
//echo $term->slug; // will show the slug?>
<div <?php post_class(‘contents’); ?>> <h3><?php echo $term->name;?></h3> </div>