Support » Fixing WordPress » MIgrated WordPress site has collation problems

  • Resolved kwdavids

    (@kwdavids)


    I have an old blog (created in December of 2008) that has been moved a few times between sites. In all of that moving around some of the tables ended up with different MySQL collations. Specifically wp_comments has latin1_swedish_ci and wp_posts has utf8_general_ci. My wp-config.php file just has

    define(‘DB_COLLATE’, ”);

    Somehow it all works.

    Now I have exported my database and imported it to a new host and on the new site some characters (quotes, etc) aren’t displaying properly; for example “Here’s” appears “Here’s”.

    When I edit the table in phpMyAdmin on old and new sites I see the strange characters, and in WordPress on the new site I see strange characters, but the old WordPress site looks normal. Can someone suggest how I can make the new site look like the old without major surgery?

    Both sites have a server connection collation of utf8mb4_unicode_ci.

    • This topic was modified 1 year, 8 months ago by  James Huff.
    • This topic was modified 1 year, 8 months ago by  kwdavids.
Viewing 2 replies - 1 through 2 (of 2 total)
  • I have found the same problem in both posts and comments, so the different database collation isn’t the problem.

    OK, I fixed it. I had to remove a

    define(‘DB_CHARSET’, ‘utf8mb4’);

    directive from wp-config.php

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘MIgrated WordPress site has collation problems’ is closed to new replies.