Have you ever received a message “Publishing failed” or “Updating failed” while publishing your posts? WordPress updating failed is a very common problem that many bloggers face.
Sometimes after clicking the “Publish button” you receive such messages. If you are using Block Editor, you are more likely to encounter this problem. But, if this happens, there’s no need to panic. You can resolve the issue yourself easily enough.
In this article, we’ll show you how to fix the issue with step by step instructions.
Why am I seeing an ‘updating failed’ error?
Block Editor has received mixed reactions ever since it was introduced. One of the major problems associated with it is publishing failed or updating failed error. It is very irritating for any blogger. There can be many reasons for the ‘updating failed’ error but more often than not, it is related to the Block Editor.
The new WordPress editing interface depends on the REST API for publishing or saving the posts.
If you are not a developer, just the mention of REST API may seem a bit scary. All you have to do to resolve the issue is to understand how Block Editor communicates to WordPress.
When the process of communication is disabled or blocked, the publishing function of Block Editor fails and you can’t post new content. So, you have to get the REST API working again to fix the problem.
How to fix the WordPress updating failed and publishing failed error
- Check if the REST API is blocked : You can do it by using the Site Health Tool –
- Go to your dashboard
- Go to Tools -> Site Health
- Under the Status tab, you will see a list of the existing problems with your installation
- If the REST API is blocked, the following message will be displayed
|“The REST API encountered an unexpected result.The REST API is one way WordPress and other applications communicate with the server. One example is the block editor screen, which relies on this to display and saves your posts and pages.”|
- The Site Health Tool will show a specific error that is producing the undesired result
- This can be a “404 not authorized response”, an operation timeout, a “403 Cookie Nonce is invalid” message or any other error.
How to move forward to resolve the problem and enable the REST API again will depend somewhat on the error you find listed here.
- Re-enabling REST API after solving the error
Usually, the Site Health Tool gives some indication about how to re-enable the REST API on your WordPress site.
Here are some common solutions –
- Check to find out if Cloudflare is blocking the REST API: If you are a Cloudflare user, chances are there that your firewall is blocking the legitimate requests. You have to check your Rule Set to determine if that is the case. Disable rules as necessary to fix the problem.
- Make sure no plugin is disabling the REST API: Some plugins may also block the REST API. You can disable the plugins one at a time to find out which one is causing the problem. You may remove, replace, or change the settings of the plugin to enable the REST API again. Be sure to take a backup of your website before you do this.
- Authenticate the REST API via your .htaccess file: REST API needs your site to be authenticated for connection. If your site is not doing so, you may need to make some small changes to your .htaccess file to resolve the issue.
- Check if the issue is server related: Sometimes the problem takes place while running WordPress on a Windows server. You have to edit your wp.config file to fix the issue. An easy way is an FTP client. It allows you to transfer files between a server and your device. Windows users can install WinSCP or SmartFTP to settle the issue.
- Debugging to find more errors: If none of the above-mentioned solutions works, you may need to turn on the debug mode of WordPress.
After you activate it, the debug mode will log all the PHP responses in a file called debug.log in the wp-content directory of your site. You can search this file to find out the errors that may be preventing your site from connecting to the REST API.
For activating debug mode, add the following code to your wp-config.php file.
// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
Make sure you remove this code from your wp-config.php file after the issue is resolved.
- When none of this works…
In some cases, the above steps may not help to resolve the “publishing failed error”. In such cases, you will have to take support from any of the following –
- Your hosting service provider: If you feel the issue is server related or if your host provides WordPress support
- A plugin or firewall application: If you feel that a tool that is integral to your site is blocking the REST API and you are not able to solve the issue.
- The WordPress support forums: If you feel that you require further guidance. For example, guidance for a free plugin that doesn’t provide user support.
While working with a relevant support provider to fix the “publishing failed error”, you may want to install the plugin Classic Editor as a temporary solution.
Alternative / Temporary Solution: Install the Classic Editor plugin
To install Classic Editor, follow these steps –
- Go to your WordPress dashboard
- Click on Plugin – > Add New
- Search for Classic Editor
- Click on Install Now
- After the installation is complete, activate it. And, you are done!
As the TinyMCE Editor doesn’t need the use of REST API for publishing or updating posts, you should be able to make the necessary changes to your content and edit or publish posts.
In any case, this is a temporary measure. You’ll still need to resolve the root cause of the problem in the Block Editor and then re-enable it.
I hope you found the information helpful. Try the steps, you’ll be able to fix the WordPress publishing or updating errors on your own.
Leave your feedback in the comments section. We would love to hear from you. If you have any questions, please let us know. We will get back to you soon. You can find us on Twitter and Facebook. Also, subscribe to our Youtube channel for more tutorials