If your WordPress site is returning an error message such as “Updating Failed” or “Publishing Failed” when you try to make changes, the results can be not only frustrating but can also prevent visitors from accessing what they need.
Fortunately, there are a few common causes and workarounds that can help you resolve this issue if you encounter it. With a little troubleshooting, you should be back to your regular posting schedule in no time.
In this article, we’ll discuss what causes the “Updating Failed” and “Publishing Failed” errors in WordPress. Then we’ll explain four ways you can fix or work around the problem, to get your content up for readers.
Let’s get to it!
Why WordPress Sometimes Fails to Update or Publish Content
The Block Editor has been around for a while now. It’s still being met with mixed reactions, however, and there are also new challenges and errors that WordPress users can face because of it.
One such issue is a message reading “Publishing Failed” in the WordPress editor:
This message may appear after you click on the blue Publish button, in an attempt to make your content live. A variation of this error is the “Updating Failed” message, which may show up when you attempt to make changes to a post or page that you’ve already published:
As you can imagine, this problem can be an especially frustrating one for bloggers, as well as any site owner who finds themselves needing to update key information on their web pages.
There are a few different causes of the “Publishing Failed” error, but one in particular is linked to the Block Editor. The new WordPress editing interface relies on the REST API to create, save, and publish posts. In the event that something is blocking or disabling this process on your site, you won’t be able to launch new content.
If you’re a beginner or just a less-technical user, any mention of the REST API can seem intimidating. However, in this case, there’s no need to worry.
All you need to understand for the purposes of resolving the “Publishing Failed” error is that the REST API is how the Block Editor communicates with WordPress.
When this communication is broken or disabled, the Block Editor’s publishing functionality breaks. If that is what’s causing the error on your site, you’ll need to get the REST API working again in order to fix it.
How to Fix the WordPress Updating Failed and Publishing Failed Errors (In 4 Steps)
Once you understand why your WordPress content is failing to update or publish, resolving the problem becomes easier. Here are four steps you can take to go about fixing this problem on your site.
Step 1: Determine Whether the REST API Is Being Blocked
A common cause of the “Publishing Failed” error in WordPress (since the Block Editor was launched) is that the REST API is being blocked or disabled. If you’re seeing this message, a wise place to start troubleshooting is by testing the REST API to make sure it’s working.
You can do this directly in WordPress using the Site Health tool. To access it, navigate to Tools > Site Health:
Under the Status tab, WordPress will list any existing problems with your installation. If the REST API is being blocked, you’ll see the following message:
“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 save your posts and pages.”
The Site Health tool will also display a specific error that is producing the ‘unexpected result’. This could be a “401 Not Authorized” response, an operation timeout, a “403 Cookie Nonce Is Invalid” message, or another error.
How you should go about resolving this problem and enabling the REST API again will depend somewhat on the error you see listed here.
Step 2: Re-Enable the REST API by Resolving the Specified Error
Ideally, the Site Health tool will provide some indication as to how you can re-enable the REST API on your WordPress site. Some common solutions include:
- Checking to see if Cloudflare is blocking the REST API. If you’re a Cloudflare user, your firewall may be inadvertently blocking legitimate requests. Check your Rule Set to determine if the REST API is being blocked, and disable rules as necessary to let it through.
- Making sure a plugin is not blocking or disabling the REST API. Some plugins may block the REST API as well. Disabling your plugins one at a time can help you determine which one, if any, is causing the problem. You may then remove, replace, or change the settings for that plugin to enable the REST API again. Security and performance optimization plugins are common culprits.
- Authenticating your WordPress site with the REST API via your .htaccess file. The REST API requires your website to authenticate itself before it can connect. In the event that your site is not doing so, you can make a small edit to your .htaccess file to resolve this issue.
- Determining if the issue is server related. Some users have found that they encounter this problem when running WordPress on a Windows server. You’ll need to edit your web.config file to fix it.
Plugins and firewall applications are the source of the problem most of the time, so it would be wise to start your troubleshooting attempts there.
Chances are, you’ll be able to find the tool that’s causing the “Publishing Failed” error in WordPress and disable it or change its settings to resolve the issue.
Step 3: Enable Debugging Mode to Search for Errors
If you can’t re-enable the REST API using one of the solutions listed in Step 2, you can try turning on WordPress’ debug mode. This feature is meant for temporary use as a troubleshooting tool.
When activated, the debug mode will log all PHP responses in a file named debug.log in your site’s wp-content directory. You can search this file for errors that may be preventing WordPress from connecting to the REST API, and therefore from publishing or updating posts.
To activate debug mode, add the following code to your wp-config.php file before the line that reads “/* That’s all, stop editing! Happy blogging. */”:
// 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 to remove this code from wp-config.php once you’ve resolved the error.
As an alternative, Kinsta customers can access the error logs available in their MyKinsta dashboard.
To access yours, log in to your MyKinsta and navigate to the Sites tab:
Click on the name of the website experiencing the error in the resulting list. Then navigate to Logs and select error.log from the drop-down menu:
You should then see a list of any issues your WordPress site is currently experiencing.
Step 4: Install and Activate the Classic Editor Plugin as a Temporary Solution
In the unlikely event that the above steps are not helpful in resolving the “Publishing Failed” error in WordPress, you’ll likely need to seek support from one of the following sources:
- Your hosting provider if you believe the issue is related to your server or if your host provides WordPress support.
- A specific plugin or firewall application, such as Cloudflare, if you believe a tool that is integral to your site is blocking the REST API and you’re unable to remedy the problem yourself.
- The WordPress Support forums, if you feel you need further guidance, such as for a free plugin that does not provide user support.
While you work with a relevant support provider to resolve the “Publishing Failed” error, you may wish to install the Classic Editor plugin as a temporary workaround:
Since the TinyMCE editor does not require the use of the REST API to publish or update posts, you should be able to make the necessary changes to your content with it.
However, this is only a stopgap measure. You’ll still want to resolve the root cause of the error in the Block Editor and then re-enable it.
Not being able to publish or update your WordPress site’s content can be a serious problem. Fortunately, there are a few common causes of these errors that you can quickly troubleshoot to put things back in order.
If you’re receiving an “Updating Failed” or “Publishing Failed” message in the WordPress Block Editor, try:
- Determining whether the REST API is being blocked.
- Re-enabling the REST API by resolving the specified error.
- Enabling debugging mode to search for errors.
- Installing and activating the Classic Editor plugin as a temporary solution.