After performing an upgrade to an earlier version of WordPress, I saw some weird characters (e.g. “ for “”) shown on my posts. It turned out that many people had the same problem as mine. So, if you encounter some character encoding problems which prevent WordPress from showing “normal” characters, there are some fixes that you can try:
Changing Config Files
One thing you can do is to change the wp-config.php file by adding or replacing these codes:
define('DB_CHARSET',''); define('DB_COLLATE', '');
It worked for me only once. When the next time I did an upgrade and the problem occurred again, it didn’t work anymore. So I tried the next fix.
Executing SQL codes
This fix is for advance users only who are quite familiar with the SQL codes. Please backup your database first before proceeding!
Once you’ve done that, execute these SQL codes:
UPDATE wp_posts SET post_content = REPLACE (post_content, '–', '---') UPDATE wp_posts SET post_content = REPLACE (post_content, '’', ''') UPDATE wp_posts SET post_content = REPLACE (post_content, '“', '"') UPDATE wp_posts SET post_content = REPLACE (post_content, 'â€', '"')
What these codes do is to replace the strange characters in your post content into the ones that are readable by WordPress. The codes use wp_posts table, so make sure you change these table names if you use different table names for your WordPress blog.
Hope it works!