WordPress Unknown Collation utf8mb4_unicode_520_ci Solution

Sep 30, 2017   Web Development   Nick Vogt   Comments
If you're importing or migrating your WordPress database to a server that has an older version of MySQL (like version 5.5.x), you may run into this error:

Unknown collation: ‘utf8mb4_unicode_520_ci’
The utf8mb4_unicode_520_ci collation is available in MySQL versions 5.6.x and newer, and WordPress utilizes that collation if it's available during installation. To be able to successfully import or migrate to a server with an older MySQL version, you have one of three options:

Option 1
The best solution is to upgrade the server to a more recent version of MySQL that supports utf8mb4_unicode_520_ci, or ask your host to do it for you. This will ensure the best data integrity for your migration.

Option 2
If exporting from the old server using PHPMyAdmin, choose the advanced option to export to an older MySQL server:

MySQL Export Old Version

Option 3
If you have the exported .sql file, you can do a simple Find & Replace using a text editor such as Notepad++, replacing all occurrences of utf8mb4_unicode_520_ci with utf8mb4_unicode_ci:

Notepad++ Replace
Share This Post
Facebook Twitter

Comments (0)

Share This Post
Facebook Twitter
H3XED © Nick Vogt   RSS   Policies   Facebook   Twitter   Google+