How to stop WordPress from using utf8mb4_unicode_ci collation

You can filter every database query with the hook query, for example like this: add_filter( ‘query’, function ( $query ) { return str_replace( ‘utf8mb4_unicode_ci’, ‘utf8_unicode_ci’, $query ); }); However, I would strongly recommend not to do this. Update your databases instead. The old utf8_* collations have very annoying limitations, and you will run into plugin … Read more

Problem in adding new site on WP multisite

The problem was solved in the next update of WordPress. By the way if you still haven’t updated your version of WordPress: It’s enough to set DB_COLLATE in the wp-config.php: define(‘DB_COLLATE’, ‘utf8mb4_general_ci’); // on condition that your DB_CHARSET is ‘utf8mb4′ That’s it! The bug is hidden in the file \wp-includes\wp-db.php on the line 731 in … Read more

database collation differences

From quick check of the MySQL manual the database collation is only relevant for database–level operations (emphasis mine): For CREATE TABLE statements, the database character set and collation are used as default values for table definitions if the table character set and collation are not specified. To override this, provide explicit CHARACTER SET and COLLATE … Read more

Unknown collation when I import a dump from an existing site into a development database?

This issue is as a result of your server not supporting the utf8mb4_unicode_520_ci collation type. To resolve this you should convert the collation for all tables with utf8mb4_unicode_520_ci to utf8_general_ci If you’re exporting through phpmyadmin, you can: Click the “Export” tab for the database Click the “Custom” radio button Go the section titled “Format-specific options” … Read more

Hebrew Characters Have gone bad

I’m totally shocked. After hours of trying things and testing, I finally found the “Settings” then “Readings” option below: “Encoding for pages and feeds”. After changing from UTF-7 to UTF-8, everything looks good again. And even stranger, after changing it to UTF-8, the option disappears from the page. According to WordPress site, this option was … Read more