WordPress is a completely open source tool, free for users. However, occasionally some odd error messages will appear which can interfere with your work.
For example, you can be prevented from creating new posts or editing posts and a WordPress ‘Publishing failed’ notification or ‘Updating failed’ error message will appear, which can be frustrating when you’re in the flow of work.
This article is designed to help you understand the cause of the error and provide a few ways to fix it as quickly as possible.
Try these actions to solve the WordPress ‘Publishing failed’ problem on your site.
The cause of the issue may be a bad cache plugin. Popular plugins include WP super cache, W3 Total Cache and Autoptimize. These tools clear the cache on your site when changes are made. If the plugin is incorrectly designed, the cache may not be cleared, and your old site will appear.
Try to empty the cache with the plugin settings. If the plugin you have is W3 Total Cache, go to settings and empty cache. This should solve your problem and make the changes visible to users.
The plugin can also define what needs to be cached. This page cache functionality is available in W3 Total Cache. Under Page Cache, go to the menu where you’ll see a way of not caching the front page. Usually, it will be set to caching the front page and you can untick this.
If these methods aren’t working, you could try turning off your cache plugin. To do this, you just need to deactivate it by heading to Installed Plugins and then click Deactivate on your cache plugin.
CDN utilizes distributed edge servers to send your content across the globe. When users go to your site, a host server is used to enable access. Even if traffic on the server is high, users still try to access the same host server which slows down your site. CDN assists with its large network. It will cache any permanent content and keep it on a server. If traffic becomes slow, the user can be redirected to this server.
The CDN content may not always update when you make changes to your static content.
Cache plugins are used to enable CDN. Bypassing the CDN could solve your issue, so you could try disabling it temporarily, by heading to the General Settings of your W3 Total Cache plugin and unticking the CDN option. This should solve your issues so you should be able to see all changes in WordPress as you make them and eliminate the error message.
Nginx uses a different user group on the server rather than the one in the fastcgi cache folder. This can make it a tricky folder in WordPress and cause problems and error messages such as ‘Publishing failed’.
Remove the fastcgi cache folder to solve this issue. When your server next wants to cache something, it will automatically create it in the right place withno need to restart PHP, Nginx, or anything else.
You can find your fastcgi cache folder in an Nginx config file
where it’s defined with a fastcgi_cache_path operator. The command below should help you find exactly where this operator is in your Nginx.
Log into the WordPress server of your site with a root OR with a sudo user. Then run this command:
grep -rnw '/etc/' -e 'fastcgi_cache_path'
The output should look something like this:
/etc/nginx/sites-available/allthings.conf:2:fastcgi_cache_path /var/www/cache/fastcgi levels=1:2 keys_zone=allthings:100m inactive=50m; /etc/nginx/sites-available/allthings.conf:90: # Define memory zone for caching. Should match key_zone in fastcgi_cache_path above. /etc/nginx/sites-available/allthings.conf:208: # Define memory zone for caching. Should match key_zone in fastcgi_cache_path above.
The above example clearly shows that you’ll find your fastcgi_cache-Path in allthings.conf, an Nginx configuration file. The fastcgi cache folder is then /var/www/cache/fastcgi.
Your fastcgi cache folder won’t be in the same place as in the example given which is only to show you how the output will appear. You’ll need to search for your folder.
When you find your fastcgi cache folder on the Nginx server, you can rename it by running this command.l. Then Nginx will recreate it automatically with the right permissions.
sudo mv /path/to/cache/fastcgi /path/to/cache/fastcgi.old
In the code above edit ‘/path/to/cache/fastcgi’ to be the location of your fastcgi cache folder that you found in the previous step.
Once you’ve run the command above, your folder will be renamed and will have a .old extension.
To solve the problem of the WordPress ‘Publishing failed’ error, go back to the original WordPress editor rather than returning to an old WordPress version. Try this if you’ve been using the new Gutenberg editor instead of the usual WordPress editor.
Simply deactivate the Gutenberg editor. This should solve your error message problem and get your page back to normal.
How do you disable Gutenberg?
This will cause your WordPress to go back to using Classic Editor rather than Gutenberg. You can now resume publishing or editing your posts and pages as normal. If you’ve downloaded the plugin but can’t see Classic Editor, you’ll need to go to your settings, then go to writing and tick Classic Editor as the default editor.
One of the first methods to try to resolve your ‘Publishing failed’ WordPress error is reactivating your plugins by deactivating all of your site’s plugins. Then you can test and reactivate them one by one.
If your WordPress post failed to publish, another solution is to activate debug mode, which may help you find out the cause.
If you want to turn it off again, just take out the code or you can change “true” to “false” in the code.
HTTPS may be causing the failure of your WordPress updating. In this case, follow these steps to resolve the error:
If the WordPress updating failed error appears and you are unable to publish, try this quick fix:
This simple action can cause WordPress to change and fix the .htaccess file. Navigate to the editor, change something and click “Save draft”, which may successfully remove the error.
If your WordPress update failed and you use Cloudflare, you can try switching to “Full SSL” in the SSL/ TLS settings> Overview tab.
If you enjoyed reading this article about Wordpress publishing failed, you should read these as well: