If WordPress throws an error when you save a post containing emojis, such as text pasted from ChatGPT, the cause is usually your database collation: the setting that decides which characters a table can store.
Here’s how to check it and fix it. There’s also a video walkthrough on YouTube.
Video Guide
Understanding the Problem
You paste in text with emojis, click save and get an error. That usually means some of your database tables use an older character set that can’t store emojis.
The Solution: Check and Update Your Database Collation
The fix is to check the collation of your tables and update any old ones. Back up your database first. Then:
- Install WP Adminer: Begin by installing the WP Adminer plugin. This tool allows you to directly manage your WordPress database.
- Access WP Adminer: Once installed, access WP Adminer through your WordPress admin panel.
- Check Your Current Collation: Look at your database tables. If you see a collation like utf8mb3_unicode_ci, this is likely the cause of the problem. WordPress tables should ideally use utf8mb4_unicode_520.
- Update the Collation:
- Use the “alter table” command to modify the collation of your post table and other major fields.
- Change the collation to utf8mb4_unicode_520.
- Execute the changes and save.
Why This Works
Newer WordPress tables use utf8mb4_unicode_520_ci, which can store emojis. Older tables, often from sites set up years ago, may use a character set that can’t. Converting them lets them store emojis like any other text.
Alternative (Not Recommended): Filtering Emojis
You could strip emojis out instead, but then you lose them from your content. Fixing the collation solves it properly.
Still Not Saving?
If every table is on utf8mb4_unicode_520_ci and posts still won’t save, the problem is somewhere else. Check your PHP error log for the actual error message.





