Skip Navigation

If your site shows question marks for non-English characters, most chances are your database character encoding is different than UTF-8.

If you’re using PHPMyAdmin, the structure of your wp_posts table should look like this:

wp_posts viewed from PHPMyAdmin

If you see a different value for the collation, it means that the character encoding is wrong. This will cause text to display incorrectly, because the browser doesn’t know how to show non-English characters.

There’s an easy fix.

All you need to do is run ALTER statements which will go through your data and change it from its current encoding to UTF-8. The easy way to do this is to use the Convert WP Database to UTF-8 plugin. This plugin runs the following SQL statements:

ALTER TABLE $table CHANGE $field_name $field_name $field_type CHARACTER SET utf8 COLLATE utf8_bin

As you might imagine it’s a very good idea to backup your database before doing this.

Finally, to make sure that you’re not skewing away from UTF-8 in the future, edit your wp-config.php file and set the charset definition correctly. It should say:

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');