How to solve “Updating Failed. The response is not a valid JSON response” error

Do you like to solve the “Updating Failed. The response is not a valid JSON response” error in the shortest time possible? Solving this problem will enable you to move ahead to do quality work of publishing new posts or updating old ones.

I also encountered the same issue one fine day and resolved it without losing the existing content. The problem appears when we try to save the draft of a post or page. Due to this error, we won’t be able to update any post. Sounds scary!

In this post, I will share a method that worked for me to solve JSON response error in WordPress. Based on the experience, I will also suggest a mechanism that will be helpful to you in resolving any issue with WordPress.

Updating Failed. The response is not a valid JSON response

What is JSON response?

JSON is a short form for JavaScript Object Notation which is an open-standard format for data interchanging.

It is a fairly simple format for communicating the data between two entities as it uses human-readable text in the form of property name – value pair.

For example, a JSON format is given below.

{"Name": "Thomas",
"Age":  30,
"Occupation": "Scientist",
OfficeAddress: {
"Street": "3rd Street",
"City": "New York"
},
"Email" : "xyz@gmail.com"}

You must have now realized that the changes you make in a post are communicated back to the hosting database in the form of JSON. When the server is unable to decode the JSON response, the error is reflected.

Recent Changes

As a part of the resolution, recall the time when the problem was not there. Post that time, list down the changes you have made to your website.

Kindly take a backup of everything first so you can revert to it if needed. This step will safeguard your content.

If you have added new plugins, then deactivate/delete them. Usually, posts do not cause the issue. So, don’t delete any post or revert the content.

In my case, I activated a few plugins and enabled Cloudfare basic content delivery network (CDN) on Bluehost to optimize the site for performance. I noticed the error after 2-3 days when I started writing a new post. In that, JSON response error in WordPress was only happening when I added a Custom HTML or Shortcode block with Adsense code. So, identifying the steps leading to the error is key to its resolution.

I tried a few steps/suggestions available on the Internet to resolve the issue. However, these turned out to be not much of a help. Usually, these suggestions lack real experience in dealing with the matter.

I contacted my hosting provider support afterward based on my past experience with them. For most of the hosting providers, basic support costs no money. In this regard, I can vouch for Bluehost, my hosting provider.

Bluehost Support

Initially, the support suggested I revert the site to the old backup, meaning content loss. However, I persisted in avoiding this and requested other ways to resolve the problem.

So, the support first replaced the core WordPress files and later suggested disabling Cloudflare on my site when the problem did not resolve.

json response error in WordPress

Though I said yes to disabling Cloudflare, I was skeptical whether this would solve the issue. I thought, at best, disabling Cloudflare would cost some optimization, but it is ok if it resolves the problem.

After disabling CDN, the site was down for 2-3 hours for DNS propagation.

To my surprise, the issue was no longer there after disabling of CDN. Hurray!

Summary

With the above experience, I suggest all attempt simple methods to resolve an issue.

If the issue persists, better to contact the hosting provider and not waste time attempting various methods.

If you have any queries on this topic, please drop a comment for an answer. I hope your problem will get resolved soon. Be positive!

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments