After updating WordPress, it was a nightmare, it started throwing errors & the new editor was awesome
One of them was “Updating failed”, throw in Post editor, I saw the forum many users were having the same issue as like me, they thought that was an issue with hosting no, not it was, It was caused by 3rd Party plugins or Customizations made by Users.
What was it?
REST API, WordPress new editor Gutenberg uses RESP API, JSON to communicate with WordPress Backend. REST API was introduced in WordPress 4.7, It was available as a separate plugin then, but in 4.7 it was official, but almost 90% of users do not need it. So they disabled it.
Fixing “Updating Failed”
“Updating Failed” was caused by disabling REST API, It can be done with 3rd Party plugins or Code Snippets. Now to fix the error you have to activate REST API, You just have to find out which plugin has disabled REST API and untick that option, or remove the PHP Code snippet that was used.
In my case it was, W3 Total Cache, REST API was disabled in “Page Cache” settings, Unselect it and save boom, Issue was fixed.