I’m having trouble installing WordPress on my localhost development area. Everything is working fine, but when I want to move my site to an online environment problems are showing up with the DB collation.
I read about this and it seems that WordPress created tables on my localhost using the utf8mb4_unicode_ci charset/collation. Although my online environment has an higher version of mysql running, it won’t import the tables when moving.
I decided to force WordPress to use an older db collation on my localhost. So I changed wp-config to this, before running the setup:
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', 'utf8_general_ci');
I saved it and ran the setup. A quick check in the database resulted in tables still in utf8mb4_unicode_ci collation!
How to force WordPress to use the utf8_general_ci collation?
Before installing, comment the line in wp-config-sample.php
Create a database manually with utf8_general_ci and then install wordpress.
The tables are installed with default collate the database.