zhao-sun.com

August 23, 2010

Chinese Characters in WordPress

Filed under: Computer — blogadmin @ 4:00 pm

Chinese characters do not work in WordPress by default if you didn’t originally setup your WordPress to handle Chinese.

However, it is pretty easy to get it working. I didn’t see it documented elsewhere, so I thought I’d post instructions on configuring WordPress to allow posting Chinese.

* Using a program (like phpMyAdmin) to administer your database, select the WordPress database.
* Find the wp_posts table, and click on the “structure” icon (it is the second from the left under Actions)
* Click the “pencil” icon on the wp_content table.
* Change the Collation option to utf8_unicode_ci (on mine, that’s the option at the very bottom).
* Click Save.
* If you want to enable Chinese in titles, you can repeat the procedure for the wp_posts.wp_title. You might also want to enable it in comments by repeating on wp_comments.comment_content and wp_comments.comment_author.

That’s it! You can now post 汉字 in WordPress!

Powered by WordPress