How to fix the “updating failed” error on WordPress and Cloudflare

This is a guide on how to fix the “updating failed” error on WordPress 5.2.3 and Cloudflare.

As context, I am running my blog on WordPress, hosted on Google Cloud Platform (GCP) and using Cloudflare for my CDN (Content Delivery Network) to bring my content closer to my readers.

My key goals this year have been to update my blog to:

  1. Ensure SSL and HTTPS is working correctly throughout the website to comply with Google’s SEO requirements
  2. Mixed Content is managed (so I am not showing content from both https:// and https:// sources, which affects my SEO)

I faced this error which was unexpected, which I am sure others may face as well.

Updating Failed error message on WordPress 5.2.3

Reasons for why you are seeing the “Updating Failed” error

You may be wondering why suddenly you cannot edit or create new posts. One of the main reason is related to the update that WordPress made when version 5 was made available. That is, WordPress 5.0, 5.1, 5.2 onwards. So if you have recently updated WordPress to latest version you may suddenly notice that you cannot update any posts nor can you publish any new posts or pages. This is mainly related to how WordPress 5’s “Gutenberg editor”.

Ways to solve the “Updating Failed” error on WordPress 5.2.3

Here are some suggested approaches you can explore to help you post again and fix the “Updating Failed” error on your WordPress website.

  1. Clear your browser cache
  2. Run the WordPress Site Health healthcheck plugin and update your WordPress to HTTPS (recommended)
  3. Change to Full SSL on Cloudflare from Flexible SSL
  4. Install the WordPress Classic Editor plug in
  5. Turn off HTTPS for all pages of your WordPress blog while you are editing (not recommended)
  6. Deactivate the security plugins (not recommended)
  7. Changing your permalinks (not recommended)

1. Clear your browser cache

Didn’t work for me, but you can try and see if this helps you

2. Run the WordPress Site Health healthcheck plugin and update your WordPress to HTTPS (recommended)

I tested the Site Health healthcheck using the inbuilt WordPress 5 feature called “Site Health”. This is found under “Tools> Site Health”. It was what solved my problem permanently.

For me, the Site Health said that I was accessing the site via https, but the address in my WordPress> Settings> General setup was still http. I updated this discrepancy and the failures went away. It may differ depending on your set up on how you fix this as well, but the sub-steps below describe my process. I hope it helps!

General settings that is missing the HTTPS:// and has https:// for the website link
Tools> Site Health to check your WordPress health

For advanced users only as this will be technical, and for those using Google Cloud Platform (GCP) and Bitnami as I am, you’ll need to make the following changes via the SSH of your Google Cloud platform.

For those using ngnix for your server you will type these commands:

$sudo nano /opt/bitnami/apps/wordpress/htdocs/wp-config.php
$sudo /opt/bitnami/ctlscript.sh restart

For those using apache for your server you will type these commands:

$sudo nano /opt/bitnami/apps/wordpress/htdocs/wp-config.php
$sudo /opt/bitnami/ctlscript.sh restart apache

(Optional) You may notice that I was using the “$sudo chmod 660 /opt/bitnami/apps/wordpress/htdocs/wp-config.php” command as well in my screenshot chmod 660 command as that is needed to give my WordPress instance enough memory to run plugins (in may help you in case you haven’t already done so already).

$sudo chmod 660 /opt/bitnami/apps/wordpress/htdocs/wp-config.php are using chmod 660 command as that is needed to give your WordPress instance enough memory to run plugins (in case you haven’t already done so already).

In SSH type these commands to get into the config file
Edit these two lines of code
Save this by using the hotkey selection Control (^) + O on a Mac
Receive a confirmation it has been saved
Check your posts to see if you can edit
Test another post

3. Change to Full SSL from Flexible SSL on Cloudflare

If you are using Cloudflare, you can switch to “Full SSL” mode. You can change this in your SSL/ TLS settings> Overview tab.

4. Install the WordPress Classic Editor plug in

You can also try installing the “Classic Editor” plugin to see if your post are editable. This did not work for me but it is worth testing. This will disable WordPress 5’s “Gutenberg editor” and you can see if that resolves the issue.
Classic Editor plugin at wordpress.org/plugins/classic-editor/

5. Turn off HTTPS for all pages of your WordPress blog (not recommended)

You can consider turning off HTTPS for all pages of your WordPress blog while you are editing each time though I do not recommend this. As it does mean your website is not secure during these instances.

On Cloudflare, I changed this setting via the Page Rules to test this, you can also do this via the global settings too. For Page Rules For Global settings this is found at: SSL/ TLS > Edge Certificates> Always Use HTTPS.

Changing the Always Use HTTPS via the global site wide settings
Changing the Always Use HTTPS via Page Rules

6. Deactivate the security plugins to fix the “Updating Failed” error on WordPress (not recommended)

Some folks have recommended disabling security plugins but I do not recommend this. Very likely one of the security plugins may be locking your website to SSL (Always use HTTPS settings) or variations around that.

7. Changing your permalinks to fix the “Updating Failed” error on WordPress (not recommended)

This has been suggested by folks but I do not recommend it as it affects your SEO. Since it will change your web links completely so it will take time for your links to update throughout the internet, meaning you will lose your website visitors.

If you are really keen though, you can change this in your WordPress dashboard, under Settings > Permalinks, click on Save changes. Then try to publish your page/post again.

I hope that helps you to get back to what you and I love doing, and that’s writing more posts. Happy blogging! 😉

Installing npm and Node.js on a Mac OS laptop

This is a guide written to describe how to set up and install npm and node.js onto your Mac laptop.

If you are reading this, you are looking to leverage the cool Javascript packages from npm and run these outside of a browser for testing and utilising apps. As you ideally want to test your applications on multiple versions of npm to ensure they work for users on different versions. That is:

  • Node.js is an open-source, cross-platform, JavaScript run-time environment that executes JavaScript code outside of a browser.
  • npm makes it easy for JavaScript developers to share and reuse code, and makes it easy to update the code that you’re sharing, so you can build amazing things.
npm Javascript packages!

How to install npm and Node.js on a Mac OS laptop

1. Install Mac OS installer from Node.js

Visit NodeJS at nodejs.org/en/download/ and install this onto your Mac laptop.

You’ll find that npm is installed with Node.js. As npm is distributed with Node.js- which means that when you download Node.js, you automatically get npm installed on your computer.

2. Downloading and installing Node.js and npm

Confirm that it is installed correctly by checking your version of npm and Node.js§.

To see if you already have Node.js and npm installed and check the installed version, run the following commands:

node -v
npm -v

$ node -v
v10.16.0

$ npm -v
6.9.2

4. Run this npm install [email protected] -g

npm is a separate project from Node.js. So even if you’ve just downloaded Node.js (which also includes npm), you’ll probably need to update your npm. 

To update your npm, type this into your terminal:

$ sudo npm install [email protected] -g
/usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
/usr/local/bin/npx -> /usr/local/lib/node_modules/npm/bin/npx-cli.js
+ [email protected]
updated 1 package in 4.132s

5. Run and check npm version

$ npm - v or 
$ npm - version

Usage: npm <command>

where <command> is one of:
    access, adduser, audit, bin, bugs, c, cache, ci, cit,
    clean-install, clean-install-test, completion, config,
    create, ddp, dedupe, deprecate, dist-tag, docs, doctor,
    edit, explore, get, help, help-search, hook, i, init,
    install, install-ci-test, install-test, it, link, list, ln,
    login, logout, ls, org, outdated, owner, pack, ping, prefix,
    profile, prune, publish, rb, rebuild, repo, restart, root,
    run, run-script, s, se, search, set, shrinkwrap, star,
    stars, start, stop, t, team, test, token, tst, un,
    uninstall, unpublish, unstar, up, update, v, version, view,
    whoami

npm <command> -h  quick help on <command>
npm -l            display full usage info
npm help <term>   search for help on <term>
npm help npm      involved overview

Specify configs in the ini-formatted file:
    /Users/vulongtran/.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

[email protected] /usr/local/lib/node_modules/npm

6. Enjoy using npm and node.js on your Mac laptop!

You should be good to go to enjoy Javascript packages from npm now.

For more details, you can refer to:

Get npm!
Install Node.js, npm, and stay up-to-date. npmjs.com/get-npm

NPM – Downloading and installing Node.js and npm. https://docs.npmjs.com/downloading-and-installing-node-js-and-npm

How to remove the Elastic Compute Cloud charge from your AWS bill

I have been testing Google Cloud and AWS, so I recently decided to stop all my Amazon services so I can focus on testing on one cloud computing hosting provider. I decided I will test on Google as I like their BigQuery features.

So I scaled down all my Amazon AWS (Amazon Web Services) instances and found that I was still getting charged by AWS.

What I received was a bill, I logged into AWS and found that I needed to disable my Elastic IP address that I had set on AWS.

As I knew I had already disabled the instances itself (and in each region – be sure to check that!). But the instance still had an Elastic IP address associated and set up with it. So I didn’t realise it right now, but I was still using another paid feature, so that was what was causing that charge on my credit card was for in the following month.

Well, here is the example details that I saw when I logged into my AWS account.



Specifically this section of the bill which I discovered!

Elastic IP Addresses $1.19

$0.00 per Elastic IP address not attached to a running instance for the first hour1 Hrs$0.00$0.005 per Elastic IP address not attached to a running instance per hour (prorated)238 Hrs$1.19

Via the Billing Management Console> Bills. Here is the link here in case you need it. https://console.aws.amazon.com/billing/home?region=us-east-2#/bills?year=2019&month=5

So where do you find this Elastic Compute Cloud to turn off in your AWS account?

Well, if you go to AWS Management Console via https://aws.amazon.com/# you can find it within the listing in your dashboard. It will appear innocently as a text link called “Elastic IPs”. So you will want to click and make your way through the steps to finally “Release the IP address”.

Here are some screenshots from my experiences clicking my way through to disable it.

Right click here and select “Release addresses”

I hope that helps you manage your AWS bill better. Remember to use only the features you need!