Opened 18 months ago
Last modified 18 months ago
#48285 assigned enhancement
wp-config-sample.php should default to `utf8mb4` instead of `utf8` character set
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | minor | Version: | 5.3 |
Component: | Database | Keywords: | |
Focuses: | Cc: |
Description
MySQL's utf8
character encoding is not a correct implementation of the standard and doesn't work with 4-byte characters, which includes many emoji. utf8mb4
is the corrected implementation.
See https://medium.com/@adamhooper/in-mysql-never-use-utf8-use-utf8mb4-11761243e434 or just google "mysql utf8 vs utf8mb4"
It would seem wise for wp-config-sample.php
to default then to utf8mb4
instead of utf8
so that new installations have the improved character set.
Note: See
TracTickets for help on using
tickets.
Previously: #21212, #32405, #33122.
Thanks for the ticket!
On both new and existing WordPress installs, WordPress will automatically upgrade the tables to
utf8mb4
if the server supports that, and whenDB_CHARSET
is defined asutf8
, it will automatically switch toutf8mb4
instead.wp-config-sample.php
still needs to default toutf8
though, as not all sites can supportutf8mb4
.