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.
Built from https://develop.svn.wordpress.org/trunk@60629


git-svn-id: http://core.svn.wordpress.org/trunk@59965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2025-08-12 14:47:31 +00:00
parent bb508374c8
commit 08d1cf7509
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ define( 'DB_PASSWORD', 'password_here' );
define( 'DB_HOST', 'localhost' );
/** Database charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );
define( 'DB_CHARSET', 'utf8mb4' );
/** The database collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.9-alpha-60628';
$wp_version = '6.9-alpha-60629';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.