How to Fix the Updating Failed / Publishing Failed Error in WordPress

Are you attempting to resolve a WordPress update or publishing error on your site?

You may get the updating failed or publishing failed error when changing a post or page. This error provides no hints, making it very tough for newcomers.

We’ll teach you how to simply fix the WordPress update failed error in this article. We’ll also go through what’s causing the problem and how to prevent it in the future.


What Causes a WordPress Updating Failed or Publishing Failed Error?

The ‘Updating Failed’ or ‘Publishing Failed’ issue in WordPress is caused by a failure to communicate with the WordPress REST API.

To send and receive requests to the WordPress database, WordPress uses a collection of APIs (programming techniques) known as the ‘REST API.’

Some aspects of your WordPress website may not be able to function if it fails to send and receive those requests. The WordPress block editor, for example, leverages the API to submit WordPress update and publish requests.

Why can’t WordPress use the REST API?

You might be wondering why the REST API stopped operating on its own if I didn’t make any changes to my website.

There are several instances in which WordPress may be unable to use the REST API. It’s possible that you’re not connected to the internet or that your connection has been lost.

Other factors could be more intricate. For example, you may have altered the site URL by accident, a WordPress plugin may be to blame, or a third-party service may be preventing API connections.

With that in mind, let’s look at how to troubleshoot and resolve the WordPress update failed error.

Step 1: Verify your Internet connection and the URL of the website.

The most typical cause of the WordPress update failed error is a lost WiFi connection. If your computer’s internet connection goes down while you’re composing a blog post, WordPress won’t save your changes.

Make sure you’re connected to the internet by opening a new browser tab and viewing other websites.

If your internet is working properly, the next thing you should check is the URL setting for your WordPress site.

Simply go to the Settings » General tab and double-check the Site Address and WordPress Address choices. The URLs in both fields should be the same for most websites.

If your site URL settings appear to be correct and you are connected to the internet, you can go to the next step in the troubleshooting process.

Step 2: Use WordPress Site Health to check the status of the REST API.

WordPress has a built-in site health tool that displays crucial information about the security and performance of your site.

To see the report, go to the Tools » Site Health page. If the REST API isn’t working, it will be listed as ‘The REST API encountered an unexpected result’ under proposed improvements.

It may also display debugging information that explains what happened during the REST API call made by WordPress. Examining this data may help you figure out whether a plugin or third-party service is causing the problem.

If it doesn’t provide any information, you can go to the next step.

Step 3: Turn off all WordPress plugins.

The simplest approach to figure out if a WordPress plugin is causing the REST API to behave badly is to deactivate all of your WordPress plugins.

You can choose all plugins by going to Plugins > Installed Plugins and checking the box. After that, deactivate all plugins using the Bulk Actions drop-down menu.

After that, you can try to update the post by going to the post edit screen. If the Updating Failed message goes away, it’s likely that one of your plugins was the source of the problem.

You can now try to reproduce the problem by activating your WordPress plugins one at a time. Once you’ve identified the plugin that’s causing the problem, you can either contact the plugin’s author for assistance or look for an alternative.

If, on the other hand, disabling all WordPress plugins does not resolve the issue, move on to the next step.

Step 4: Verify the Website Firewall Service

If you use a website firewall provider like Sucuri or Cloudflare, there’s a potential that REST API queries will be blocked.

If their firewall filters flag your IP address as suspicious, this could happen. If your website is under a DDOS attack, they may also block REST API calls.

Whether you’re using Cloudflare, you can try temporarily disabling it to see if it fixes your problem.

Cloudflare settings are usually found in the Domains section of your hosting dashboard. Users of Bluehost can obtain this information under the My Sites » Manage » Performance tab.

If you’re using Sucuri, you can contact their support staff to have your IP address whitelisted or find out what’s causing the problem.

The most typical causes of the update failed problem are plugins and firewall services. However, if the issue persists, there are a few additional steps you can do.

Step 5: Enable the WordPress Debug Log and review it.

WordPress has a built-in capability that allows you to keep track of all WordPress mistakes. It does not track REST API errors, but it can assist you in determining whether there are any other issues that are generating the error.

To do so, simply add the lines below to your wp-config.php file.

// Change WP_DEBUG to true
define( 'WP_DEBUG', true );
// Keep a log of WordPress errors
define( 'WP_DEBUG_LOG', true );

Remember to save your work and re-upload the file to your server. To duplicate the error, try publishing or updating a post in WordPress.

After that, use FTP software to connect to your WordPress hosting account and navigate to the /wp-content/ folder. You can save the debug.log file to your computer by clicking here.

A plain text editor, such as Notepad, can be used to open the debug file. It may include a few errors, warnings, or notices that WordPress detected while you were working on your site or while a user visited it.

This can be a helpful clue if you find something that points to a plugin or theme file. When you ask for help on the forums or from your hosting provider, you can specify this problem.

Step 6: Switch to the Classic WordPress Editor for a while.

Enabling the vintage editor is a temporary fix for this problem. It’s the old WordPress editor, which doesn’t use the REST API to update or publish content.

Simply install and activate the Classic Editor plugin to make it work. See our step-by-step guide on how to enable the traditional editor in WordPress for more information.

You can just modify the post you were working on after activation. You’d be able to save and publish it without encountering WordPress updating or publishing errors.

Step 7: Ask for Help

If all else fails, you may need to seek assistance. You can begin by contacting your hosting provider directly. They have access to server logs as well as other tools. A misconfigured server or a malfunction on their end could possibly be to blame.

You can also get assistance from other experts and users in the forums or the WPBeginner Facebook Group.

See our post on how to ask for and receive WordPress assistance for more information.

We hope this post was helpful in resolving the WordPress updating or publishing error.

Leave a Reply