Unsatisfied with the previous 7 Unicode Transformation Formats, I recently converted the database to UTF-8. Before I get into the gory details, here’s all you need to know:
Back up your database, install this plugin, read the instructions, and follow the instructions. Everything will be done with the push of one button. There is also a sanitizer if something goes wrong, but I have not tried this plugin.
Edit: According to the Wordpress Codex, the above plugin does not work properly on newer versions of Wordpress. You will want to backup your database tables and take the long route very carefully. The sanitizer will still work as a “last resort”.
Now the real motivator to convert came from JP Meyer’s post about the annoyance of converting. Basically it comes down to the fact that using UTF-8 will make your blog easily portable, and old versions of Wordpress did not use UTF-8. The solution sounds really bad, but since it can be automated, someone finally came up with a plugin to do everything for you.
Conversion to UTF-8 is definitely an issue for anime bloggers, because many of us use foreign characters in our posts, titles, categories, etc. Everything will seem to work until you try to move your database (such as when JP tried to move his databases to a new webhost), at which point all the old Latin1 stuff will look like garbled crap. After you have converted all your data once, you should not have to ever do it again, as new versions of Wordpress are set to use UTF-8 by default. I’m not sure exactly how you can tell everything was converted correctly, but I did notice that my blogroll order (alphabetical) changed when I refreshed the main page after I completed the conversion. So for JP’s hard work, he is now listed last on the blogroll orz.
I remember hearing about the idea first on Jason’s update post. I went to the link he included, started reading, and immediately thought, “OMG this sounds really painful, I’ll do it later.”
Beginning with Version 2.2, WordPress allows the user to define both the database character set and the collation in their wp-config.php file. Setting the
DB_CHARSET
and
DB_COLLATE
values in wp-config.php causes WordPress to create the database with the appropriate settings. But, the setting can only be designated for new installations, not for ‘already installed’ copies of WordPress.
I had been using the old wp-config.php file and so I actually had to download the newest Wordpress, and use the new version of the wp-config.php that tells WP to use UTF-8. Then I used the WP-DBManager to back up the database. After this step, you can either do things the hard way, or the easy way. I picked the easy way, and if you want some background info about this plugin, here’s the forum thread. Keep in mind, the converter plugin only works for versions 2.1.x and 2.2.x of Wordpress. The conversion does take a little bit of time, depending on the size of your database, so I cleaned up my database (dropping unneeded information in various plugin-created tables) to cut down on the amount of information that the plugin needed to convert.
Edit: As the conversion plugin has not been updated since, those who are converting from a post-2.1 or 2.2 version of Wordpress will get database corruption errors from the plugin. Unfortunately, you are currently stuck using the long way of converting your database until someone comes up with a working plugin.
Now With More UTF (Converting Your Wordpress Database to UTF-8)
Unsatisfied with the previous 7 Unicode Transformation Formats, I recently converted the database to UTF-8. Before I get into the gory details, here’s all you need to know:
Back up your database, install this plugin, read the instructions, and follow the instructions. Everything will be done with the push of one button. There is also a sanitizer if something goes wrong, but I have not tried this plugin.Edit: According to the Wordpress Codex, the above plugin does not work properly on newer versions of Wordpress. You will want to backup your database tables and take the long route very carefully. The sanitizer will still work as a “last resort”.
Now the real motivator to convert came from JP Meyer’s post about the annoyance of converting. Basically it comes down to the fact that using UTF-8 will make your blog easily portable, and old versions of Wordpress did not use UTF-8. The solution sounds really bad, but since it can be automated, someone finally came up with a plugin to do everything for you.
Conversion to UTF-8 is definitely an issue for anime bloggers, because many of us use foreign characters in our posts, titles, categories, etc. Everything will seem to work until you try to move your database (such as when JP tried to move his databases to a new webhost), at which point all the old Latin1 stuff will look like garbled crap. After you have converted all your data once, you should not have to ever do it again, as new versions of Wordpress are set to use UTF-8 by default. I’m not sure exactly how you can tell everything was converted correctly, but I did notice that my blogroll order (alphabetical) changed when I refreshed the main page after I completed the conversion. So for JP’s hard work, he is now listed last on the blogroll orz.
I remember hearing about the idea first on Jason’s update post. I went to the link he included, started reading, and immediately thought, “OMG this sounds really painful, I’ll do it later.”
I had been using the old wp-config.php file and so I actually had to download the newest Wordpress, and use the new version of the wp-config.php that tells WP to use UTF-8. Then I used the WP-DBManager to back up the database. After this step, you can either do things the hard way,
or the easy way. I picked the easy way, and if you want some background info about this plugin, here’s the forum thread. Keep in mind, the converter plugin only works for versions 2.1.x and 2.2.x of Wordpress. The conversion does take a little bit of time, depending on the size of your database, so I cleaned up my database (dropping unneeded information in various plugin-created tables) to cut down on the amount of information that the plugin needed to convert.Edit: As the conversion plugin has not been updated since, those who are converting from a post-2.1 or 2.2 version of Wordpress will get database corruption errors from the plugin. Unfortunately, you are currently stuck using the long way of converting your database until someone comes up with a working plugin.
Related posts: