Disclaimer

This blog is kind of my own personal work Notebook, and the processes below are only guaranteed to work for my specific configurations. So, use this info at your own risk, and please understand I won't be able to provide any help if you break something

Wednesday, February 25, 2015

Character Encoding issue in WordPress after migration

If you start seeing weird characters instead of special characters such as the ampersand (&), or the copyright symbol ©, after migrating WordPress to a new server, try the following.

1) Download ‘wp-config.php’ from the root directory where you installed WordPress.

2) Open it, find the following 2 lines:
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
and comment them out:
//define('DB_CHARSET', 'utf8');
//define('DB_COLLATE', '');

3) Re-upload the updated ‘wp-config.php’ file overwriting the old one.

If you cannot find the two lines above in your ‘wp-config.php’ file, try adding them instead. Some hosts strip them out.

No comments:

Post a Comment