Ok, so on April 1, 2015…no kidding…Wordpress announced they are officially supporting the newer charset utf8mb4 in WP version 4.2. This charset is available in mySQL servers version 5.5.3 and higher (I think). This is cool and all, rather hipster, and up to date with best security practices and all that. However, what they completely missed was the fact that a huge portion of the shared server world is running mySQL versions 5.0 and 5.1. If you try to migrate a WordPress site from a server (or local box) that is appropriately running something remotely current to a shared hosting account with the older database, your migration will fail.
Here’s the article where they describe the changes and the beginning of the conversation about how it’s an issue…
I’m sure there are thousands of developers wasting time figuring out how to fix this issue. I’ve not found an ‘easy’ fix. Here’s mine clunky version of migrating from development to staging/production…
- From phpmyadmin, or your favorite tool, do a full SQL dump.
- Run a script or manually change, the URL of the dev site to the new one.
- Run a script or manually change ‘utf8mb4_unicode_ci’ to ‘utf8_general_ci’
- Run a script or manually change ‘utf8mb4’ to ‘utf8’
- Import your new SQL dump into the new database.
This process assumes you’ve migrated the source code of WordPress already.
You can blame ISPs for not getting current, but I think trying to upgrade these older mySQL servers to something more current is an enormous headache for clients and ISPs a like. WordPress should really have paid attention to the reality of this situation and taken measures to mitigate the issue.
Happy hunting for an easier solution, but if you need, the above will work.