Make WordPress Core

Opened 5 weeks ago

Last modified 5 weeks ago

#66109 new enhancement

Add site health check for utf8mb3 tables and columns

Reported by: zodiac1978 Owned by:
Priority: normal Milestone: Awaiting Review
Component: Site Health Version:
Severity: normal Keywords: has-patch has-unit-tests
Cc: Focuses:

Description

The utf8mb3 character set is only supporting 3-byte characters and therefore missing some emojis and other characters.

It is officially deprecated and will be removed in a future version of MySQL.
See: ​https://dev.mysql.com/doc/refman/8.4/en/charset-unicode-utf8mb3.html

MariaDB has no deprecation info ATM.

If the post_content column is on utfmb3 this could lead to stripped-out emojis, which is not easy to understand for the non-tech-savvy user why this happens.

My recommendation would be to add a new site health check to find this tables/columns, so that people can act on this.

A proof-of-concept plugin can be found here:
​https://github.com/Zodiac1978/utf8mb3-site-health

Related: #59868, #60002, #65700, #66072

Change History (1)

This ticket was mentioned in ​PR #13525 on ​WordPress/wordpress-develop by ​@irozum.


5 weeks ago
#1

  • Keywords has-patch has-unit-tests added; needs-patch removed

Adds a new Site Health check that scans the site's own database tables ($wpdb->tables( 'all', true )) for columns still using the legacy utf8/utf8mb3 character set, which is limited to 3-byte characters and cannot store emoji or other 4-byte characters, and has been deprecated by MySQL. The check reports good when no such columns are found, and recommended with a list of the affected table.column pairs otherwise. The scanned table list is filterable via the new site_status_utf8mb3_usage_tables filter.

## Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: Implementation, tests, and PR description. Reviewed by Igor Rozum.

Note: See TracTickets for help on using tickets.