Tip: Updating Failed Errors? One Possible Fix.

There are a few reports of people getting “Updating Failed” errors when trying to save drafts or publish their WordPress posts using the new “Gutenberg” Block Editor in WordPress 5.0. I had it happen to me before, and now with one of my main sites when it went to 5.0 today.

The error happened for entirely different reasons, however. Unfortunately it is a very generic error that doesn’t tell you much. In the past, while developing plugins and hacks, I got this error in the Block Editor because my code had a bug in it. Sometimes bugs show themselves in the admin or editor, but not while viewing the site. In these cases, a small bug led to a nondescript “Updating Failed” error when saving a post. Fortunately, I knew what I had just changed and I was able to spot the bug and fix it.

The same could happen to you, even if you are not doing any coding. A plugin you are using, perhaps an outdated or seldom-updated one, could have a small bug in it that posted no problem for WordPress 4.x and the Classic Editor. But for the Block Editor, it chokes.

The way to figure that out is to disable your plugins, if you can, and test. Do it one-by-one. It isn’t pretty, and definitely try it with a staging server or a less-used site if you can.

But in my case, this didn’t work. None of the third-party plugins I used seemed to be the culprit. And none of my own plugins either. None of the code in functions.php seemed to cause it.

So I turned next to the .htaccess file. I looked through it and saw that I was using some code to disable calls to wp-json. I didn’t use it for that site, and I didn’t like the idea of outside parties poking around at that data. So I disabled it in .hatccess.

It turns out that the Block Editor doesn’t get along with that idea. So I commented out those lines of my .htaccess file and all was well. I’ll probably look for a better way to disable wp-json that only affects calls from other servers. In the meantime, I’m posting this in case it helps someone else.

One Reply to “Tip: Updating Failed Errors? One Possible Fix.”

  1. Hi all here is the final solution: but let me give you some basic knowledge: 1. Please don’t change your permalink as it will affect your SEO Performance. 2. I have tried to disable all the plugin but there is no plugin error behind this issue. but my trick is does not work then you can check from your side by disabling all the plugin one by one.

    So Here is the solution for this error:
    http://latestinone.com/how-to-solve-updating-failed-issue-in-wordpress-5-0/

    This is work for me. may will for you.

Leave a Reply

Your email address will not be published. Required fields are marked *