[wp-trac] [WordPress Trac] #48285: wp-config-sample.php should default to `utf8mb4` instead of `utf8` character set

WordPress Trac noreply at wordpress.org
Tue Aug 12 14:45:45 UTC 2025


#48285: wp-config-sample.php should default to `utf8mb4` instead of `utf8`
character set
-------------------------+-----------------------------
 Reporter:  bchecketts   |       Owner:  SergeyBiryukov
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  6.9
Component:  Database     |     Version:  5.3
 Severity:  minor        |  Resolution:  fixed
 Keywords:  has-patch    |     Focuses:
-------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"60629" 60629]:
 {{{
 #!CommitTicketReference repository="" revision="60629"
 Database: Update default `DB_CHARSET` to `utf8mb4` in `wp-config-
 sample.php`.

 `utf8mb4` is the complete UTF-8 implementation in MySQL, supporting the
 full range of Unicode characters by using up to 4 bytes per character.
 This includes characters outside the Basic Multilingual Plane, such as
 emoji and supplementary characters. `utf8mb4` ensures full compatibility
 with modern text content and diverse character sets.

 As of WordPress 4.2, on both new and existing installations, WordPress
 would automatically upgrade database tables to `utf8mb4` on compatible
 servers (MySQL 5.5.3 or later). However, the default `DB_CHARSET` value
 during setup was still set to `utf8` for compatibility with older MySQL
 versions.

 As of WordPress 6.5, the minimum required MySQL version is 5.5.5, so the
 default can be updated to `utf8mb4`.

 Follow-up to [30345], [31349], [57173], [57926].

 Props bchecketts, JavierCasares, dmsnell, SergeyBiryukov.
 Fixes #48285.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48285#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list