Archive
This post is archived and may contain outdated information. It has been set to 'noindex' and should stop showing up in search results.
This post is archived and may contain outdated information. It has been set to 'noindex' and should stop showing up in search results.
WordPress Unknown Collation utf8mb4_unicode_520_ci Solution
Sep 30, 2017Web DevelopmentComments (5)
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:
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:
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:
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:
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: