Wordpress site Non-English Characters Corrupted after moving to new server
I have used cpanel transfer tool to migrate to new server. One of my wordpress website all non-English characters and icons display weird characters. It looks like encoding problem. My database is all in utf8mb4_unicode_ci.
I have also tried to export and import in utf-8 manually. It doesn"t work too.
I have two wordpress websites. Only one have this encoding problem.
I have tried to install all php options and it doesn"t work too.
All PHP Opts, Apache 2.4, PHP 8.1, and PHP 8.2
What else can cause the problem?
-
Can you check the MySQL character sets and the default character set on both servers? 0 -
Old server using MariaDB Server charset: cp1252 West European (latin1) New server using MySQL Server charset: UTF-8 Unicode (utf8mb4) Database using utf8mb4_unicode_ci which is in both old and new servers. Only one out of two faces this character encoding problem in new server. 0 -
I managed to fix the problem. I changed utf8mb4 to latin1 in wp-config.php. define ("DB_CHARSET", "latin1"); I have two almost identical websites. One works with utf8mb4 and the other latin1. Anyone knows why is that so? And also why my old server works with define("DB_CHARSET", "utf8mb4"); but not the new one. 0 -
I can't say exactly *why* things wouldn't work, but you're changing the MySQL version and the character set so I would expect there to be issues. I'm glad you found a good resolution, though! 0
Please sign in to leave a comment.
Comments
4 comments