Skip to content

Commit fc78e19

Browse files
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. git-svn-id: https://develop.svn.wordpress.org/trunk@60629 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 32bca45 commit fc78e19

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

wp-config-sample.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
define( 'DB_HOST', 'localhost' );
3333

3434
/** Database charset to use in creating database tables. */
35-
define( 'DB_CHARSET', 'utf8' );
35+
define( 'DB_CHARSET', 'utf8mb4' );
3636

3737
/** The database collate type. Don't change this if in doubt. */
3838
define( 'DB_COLLATE', '' );

wp-tests-config-sample.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
define( 'DB_USER', 'yourusernamehere' );
4242
define( 'DB_PASSWORD', 'yourpasswordhere' );
4343
define( 'DB_HOST', 'localhost' );
44-
define( 'DB_CHARSET', 'utf8' );
44+
define( 'DB_CHARSET', 'utf8mb4' );
4545
define( 'DB_COLLATE', '' );
4646

4747
/**#@+

0 commit comments

Comments
 (0)