Publish or Update Failed in WordPress 2021

Are you attempting to resolve a Publish or Update Failed in WordPress in WordPress 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.

Reason for the Updating Failed or Publishing Failed Error in WordPress

So, what causes an Updating Failed or Publishing Failed error in WordPress?

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

Image Showing updating failed

To send and receive requests to the WP database, WordPress uses a collection of APIs known as the REST API.

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

Fixing the WordPress Updating Failed / Publishing Failed Error

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 WP plugin may be to blame. Or a third-party service may be preventing API connections.

So if you have been wondering how to fix the WordPress Updating Failed and Publishing Failed errors? Let’s look at how to troubleshoot and resolve the WordPress update failed error.

Step 1. Check Your Site URL and Internet Connection

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, WP won’t save your changes.

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

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

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

Wordpress Site Address(URL)

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

Step 2. Use WordPress Site Health to check REST API Status

WP has a built-in site health tool that displays data 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.

Image Showing Site Health

It may also display debugging information. This information 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. Disable All the WordPress Plugins

An easy approach to figure out if a plugin is causing the REST API to behave badly is to deactivate all your 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.

Wordpress Installed Plugin

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 help or look for an alternative.

But, if disabling all WordPress plugins does not resolve the issue, move on to the next step.

Step 4. Check your Websites 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, it may also block REST API calls.

If you’re using Cloudflare, you can try 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 get this information under the My Sites » Manage » Performance tab.

Image Showing My Site Performance

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 common causes of the update failed problem are plugins and firewall services. But, if the issue persists, there are a few more steps you can take.

Step 5. Enable and Review WordPress Debug Log

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

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

WordPress Debug Log

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.

Image Showing wp-content/debug.log

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 WP found while you were working on your site or while a user visited.

Image Showing Debug.log

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 WP forums or from your hosting provider, you can specify this problem.

Step 6. Switch to the Classic WordPress Editor temporarily

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.

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

Wordpress Edit Post

Conclusion

If all else fails, you may need to seek help. 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 help from other experts and users in the WP forums or the WPBeginner Facebook Group.

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

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

Load More Related Articles
Load More By Susana Taylor
Load More In How to

Leave a Reply

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