How to stop WordPress using utf8mb4_unicode_520_ci collation?

Recently I’ve installed PHP7 on my MAMP and updated to newest version of WordPress. Every time I do a new site all my tables are using collation utf8mb4_unicode_520_ci I have tried setting define(‘DB_COLLATE’, ‘utf8_general_ci’); in my wp-config.php which worked fine until Gravity Forms ignored it and created all it’s tables in utf8mb4_unicode_520_ci I’ve seen that … Read more

Default table collation on plugin activation?

I’m following this to make my plugin auto-create a table when the plugin is activated, but what happens is that while all the tables (the whole db) are utf8_general_ci, the newly created table is latin1_swedish_ci… Why isn’t it also utf8? I thought it would also be utf8 by default since I have: define(‘DB_COLLATE’, ‘utf8_general_ci’); in … Read more

How do I see what character set a MySQL database / table / column is?

What is the (default) charset for: MySQL database MySQL table MySQL column 15 s 15 Here’s how I’d do it – For Schemas (or Databases – they are synonyms): SELECT default_character_set_name FROM information_schema.SCHEMATA WHERE schema_name = “schemaname”; For Tables: SELECT CCSA.character_set_name FROM information_schema.`TABLES` T, information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` CCSA WHERE CCSA.collation_name = T.table_collation AND T.table_schema = “schemaname” AND … Read more

What is the best collation to use for MySQL with PHP? [closed]

Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 6 years ago. Improve this question I’m wondering if there is a “best” choice for collation in MySQL for a general website … Read more

Please explain how WordPress works with MySQL character set and collation at a low level

As the question title suggests, I’m looking to understand how WordPress works with MySQL character sets and collation options. As I will show below, things don’t make much sense to me… I installed WordPress by following the instructions on their installation page: https://codex.wordpress.org/Installing_WordPress As part of the instructions, I followed their advice for manual creation … Read more