Are you getting the error, “Update Failed: Could not update post in the database” on clicking the Save draft or Update button while creating or updating a post in the WordPress Block Editor (Gutenberg Editor)? Don’t panic! You’re in the right place.
In this tutorial, I will guide you on what is the cause of this error, and how to get rid of it.
This is the how the error “Update Failed” appears in the WordPress Editor.
Cause of the Error & Solution
The most common cause of this error is either a piece of code or a special symbol such as UTF-8 symbol/character that you would have added in the post content, might not be compatible with MySQL database.
MySQL database might not support full UTF-8 Emojis, Asian Symbols, Mathematical Symbols, Chinese, Japanese and Korean signs, Musical notation, Ancient Languages, and User-defined font icons.
Primary Solution
Find that piece of code or a special symbol/character in your post content which is causing the error and remove it.
If the special characters/symbols are very important for you to use in the post content, then you can use those characters/symbols which are compatible with MySQL.
I have shown in the next section that how I found special symbols that I had added was stopping from saving the post, and how I got rid from the “Update Failed” error by removing them.
Other Solutions
If the above cause is not the reason then the following solutions can help you to get rid of this error:
- Deactivate your WordPress plugins and activate them one-by-one until you find the cause.
- Switch the Block Editor to Classic Editor for a while and see whether the post is saved or not.
- Go to Site health from WordPress Sidebar (Tools => Site health) and click the Status tab to check whether it is showing you a relevant issue or recommendation.
How I Got Rid of Update Failed Error?
Here I will share two scenarios (1) Update Failed Error Appeared While Updating an Old Post (2) Update Failed Error Appeared While Creating a New Post.
01. Error Appeared While Updating an Old Post
Below you can see there are three special symbols i.e. Heart, Rocket, and a Shinning Star. When I had created this post, they were allowed to be saved in the database. After few months, when I tried to update the post, I was getting the error “Update Failed: Could not update post in the database” .
I deleted the three special symbols from the post and got rid of the error.
02. Error Appeared While Create a New Post
Below you can see a Link Symbol that I had copied from Google search results. Initially, my WordPress admin would logged out as I would click the Save draft. I had no clues what was happening.
After some time WordPress Editor started to display the “Update Failed: Could not update post in the database” error. I did so many attempts and tried many solutions to fix the error, but nothing was working.
Afterwards I got a hint i.e. the content above the Link Symbol would save, and the content lying below the LINK Symbol wouldn’t save. So, I thought the Symbol might be stopping the post from being saved.
- Below you can see that I have removed the Link Symbol and typed its Name.
- Now to check whether the post is being saved or not, click the Save draft or Update button.
- Here you can see the notification Draft saved at bottom. When the “Update Failed” error occurs, the Draft Saved notification doesn’t appear.
I hope that my suggested solution would have helped you to remove the error. If you like this post then don’t forget to share with the other people. Share your feedback in the comments section below.
Also Read
- Solved: Favicon Not Showing On Browser | WordPress
- How to Stop Spam Bot Comments in WordPress
- How to Install & Set Up Yoast SEO Configuration
- 403 Forbidden Access to this Resource on the Server is Denied!
- How to Enable Optional Module Imagick on cPanel | WordPress
- Rest API did not Behave Correctly | Fix WordPress Block Editor
Leave a Reply