WordPress error Updating Failed and Publishing Errors

This will be a rushed post so it won’t look pretty. I just wanted to get this out there as soon as I could!

Recently I set up a new Ubuntu server with WordPress installed on Linode for a new project I’m working on. It is a Multisite project.

Everything went as could be expected until I tried to create, and edit a new page. I got “Publishing Failed” messages and in Google Chrome Console a number of “wp-json 404” errors.

Most solutions refer to saving Permalinks or resetting the .htaccess file.

This did not work. Also, this project is on a WordPress Multisite (with subdomain setup) which I suppose complicated things a little.

After a lot of digging it appeared to me that .htaccess was not being written to, or that there was some problem related to that and the Apache configuration for the site.

I looked at Apache conf files, made changes to <Directory “path”> and moved “AllowOverride All” higher up the list but this did not work either.

Finally, I had to hit myself in the head because I had been editing the Virtual Host for port 80! not the SSL port 443 conf file!

Once I realised this, I opened up the Virtual Host file for port 443 and added the AllowOverride All inside the


section. And all worked well!

For me the correct file to check and edit was:


Rather than <domainname>.conf

Both files are found in /etc/apache2/sites-available/

On this page

More articles

VST Interiors

VST Interiors are a top provider of drywall installations in the southwest of the UK. Their services include Metal Stud Partitions, Airless Spray Plastering and

Read More »

Oatway Design

Quote: “Oatway Design Ltd is a fresh and forward thinking design practice specialising in Mechanical and Electrical engineering solutions and services for buildings. Our motto

Read More »