WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Free Plugin by Dave Jesch v1.2.11

Database Collation Fix

Convert tables using utf8mb4_unicode_520_ci or utf8_unicode_520_ci collation to a more portable Collation Algorithm.

Database Collation Fix

The facts

Rating
5★ from 21
Active installs
1k+
Price
Free
Last updated
10 Jul 2026
Added
Apr 2017
Requires WP
4.6
Tested up to
WP 7.0.4
Requires PHP
5.3.1
Downloads
34,901

Our analysis

AI-assisted

Database Collation Fix is a WordPress plugin designed to address collation issues when migrating databases between different MySQL versions. It automatically converts database tables and columns from the 'utf8mb4_unicode_520_ci' and 'utf8_unicode_520_ci' collation algorithms to the more portable 'utf8mb4_unicode_ci' collation, which helps prevent errors during database imports.

This plugin is suitable for any WordPress installation, whether local, staging, or live. It can be activated during migration processes and will continue to monitor and update database tables automatically, making it useful for users who frequently export or migrate their sites.

Best for: This plugin is best for WordPress users who need to migrate databases across different MySQL versions.

What it does well

  • Automatically converts database collations to a portable format
  • Works on local, staging, or live WordPress installations
  • Monitors and updates database tables daily

Where it falls short

  • No information on additional features or settings
  • User must back up data before using the tool

Verdict

Database Collation Fix offers a straightforward solution for managing collation issues during database migrations, making it a practical choice for users facing these specific challenges.

From the developer

Dave Jesch's own description of Database Collation Fix, lightly tidied.

Since version 4.2, WordPress has been detecting the MySQL version and if it’s version 5.5.3 or greater, automatically selecting the ‘utf8mb4_unicode_520_ci’ Collation Algorithm. This works well until you need to migrate your database to an older version of MySQL that does not support the utf8mb4 algorithms. Then, you run into the error message: “#1273 – Unknown collation: ‘utf8mb4_unicode_520_ci'” when importing your database.

With the WordPress 5.7 update and WooCommerce 5.1, some users are reporting an error: “SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (utf8mb4_unicode_520_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT)”. The Database Collation Fix tool also fixes this issue by changing the collation of all columns in your database to use the same algorithm, removing the “mix” of collations.

Usage Scenarios:

This plugin will work in any WordPress install: local, staging or live.

Alternatively, you can install this as a regular WordPress plugin on any site. Once activated, all of your database tables will be updated to use the more portable Collation Algorithm. If you are migrating your web site, you can install and activate the plugin then perform your database export. Once you have migrated your site, you can deactivate and remove the plugin as it would be no longer needed. If you will be exporting and/or migrating your site repeatedly, such as when using it on a test or staging install, you can leave the plugin active indefinitely and it will continue to monitor and update your database tables automatically, allowing you to perform migrations at any time. This is ideal in situations where you are installing or testing plugins that may create their own database tables, as these tables may be created with the newer Collation Algorithms that are not as portable.

How it Works:

The Database Collation Fix tool converts database tables using ‘utf8mb4_unicode_520_ci’ or ‘utf8_unicode_520_ci’ Collation Algorithms to a more portable ‘utf8mb4_unicode_ci’ collation on a once daily basis. It also modifies any column-specific collation statements, not just the default table collation. This means that you can install this plugin and it will continue to monitor all of your database tables and convert them to the more portable Collation Algorithm automatically.

This tool will convert your database tables and columns to use the ‘utf8mb4_unicode_ci’ Collation Algorithm. This can be modified to any other Collation Algorithm you wish by updating your wp-config.php file and adding or changing the following setting:

define('DB_COLLATE', 'utf8_general_ci');

You can use ‘utf8_general_ci’ or ‘utf8’ or any other Collation Algorithm supported by your database. See https://dev.mysql.com/doc/refman/5.7/en/charset-mysql.html for a full description of MySQL’s Character Set and Collation Algorithm selections.

Support:

Support Details: We are happy to provide support and help troubleshoot issues. Visit our Contact page at http://davejesch.com/contact/ or submit a support request on the WordPress plugin page.

We are not responsible for any loss of data that may occur as a result of using this tool. We strongly recommend performing a site and database backup before testing and using this tool. However, should you experience such an issue, we want to know about it right away.

Read the full description on the official page →

Tagged as