👉 WordPress does not display some emojis: how to fix it

Do you get an error message in WordPress similar to this when trying to publish a post?
“Update failed. The post could not be updated in the database.”
This issue is more common than it seems and is usually caused by the encoding of your database.
đźš« Why does WordPress fail with some emojis?
If your database or tables are using the utf8mb3_unicode_ci
format (or a similar one) instead of utf8mb4_unicode_ci
, WordPress will not be able to save certain “new” emojis.
Practical difference:
- ✅ Older emojis (like 🙂 or ‼️) work with
utf8mb3
. - 🚀 Newer emojis (like 🔹 or 🪩) require
utf8mb4
.
đź§© How to fix it step by step:
To fix the issue, you need to change your database and tables encoding to utf8mb4, which is the current format compatible with all emojis.
It’s not mandatory to convert every table, although it’s recommended.
At the very least, make sure to modify:
wp_posts
wp_postmeta
If any table throws an error during conversion, you can leave it as it is.
It might belong to a plugin that handles special text comparison logic.
đź’» SQL query to update your database
Run the following queries using phpMyAdmin, Adminer, or your preferred SQL manager:
-- Change database collation ALTER DATABASE database_name CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -- Change collation for main tables ALTER TABLE wp_postmeta CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE wp_posts CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -- Add the rest of your tables here if you wish
🔧 Don’t forget to replace database_name
with your actual database name and wp_
with your table prefix if it’s different.
🎉 Final result
Once the conversion is complete, WordPress will be able to save all current emojis without errors.
You’ll no longer have issues publishing posts that include 🚀, 🩷, or any other modern emoji.