How to Fix Updating failed The response is not a valid JSON response.

If you are new to WordPress then you might have encountered this error “The response is not a valid JSON response” and spent several of hours in finding the solution of this error. Before going further and knowing the solution of How to Fix Updating failed The response is not a valid JSON response, let us know

What is JSON?

JSON stands for JavaScript Object Notation. It is a lightweight data interchange format that is easy for humans to read and write, and easy for machines to parse and generate. JSON is often used to transmit data between a server and a web application, as an alternative to XML.

Updating failed The response is not a valid JSON response in WordPress

Fix Updating failed The response is not a valid JSON response in WordPress

It is a common error in WordPress and I encountered this error when I just was publishing a blog post on my fresh website. As I was already working on the multiples blog so I have already encountered this error before so for me the solution of this error was simply deactivating the SEO Plugin.

I just deactivated the SEO Yoast Plugin for some time and I was able to publish the articles, pages without any issue. So rather than wasting time on other things and doing the research work you can simply deactivate the plugin and try publishing the blog.

To come up to this solution I did a lot of research and came up to this result. You can also try these if deactivating the plugins didn’t worked for you.

After I was done setting up the new website the first thing I did was started publishing the blog post and that was the time I encountered this error for the first time. I was confused and the first thing did was waiting, I waited for 7-8 hours to check if this issue get resolved by it’s own but it was not like that.

Here are few things which you can consider if your issue is not solved.

Switch to a default theme: Switch to a default WordPress theme (such as Twenty Twenty-One) to rule out any conflicts with your current theme. If the error is resolved with the default theme, you may need to investigate and update your current theme or consult with the theme developer.

Check for syntax errors: If you have made any recent customizations or added code snippets to your WordPress files, review them for any syntax errors. A single misplaced comma or bracket can result in the “Invalid JSON” error. Make sure your JSON data is properly formatted.

Increase PHP memory limit: In some cases, the error can be caused by insufficient PHP memory limit. You can try increasing the memory limit by editing your wp-config.php file. Add the following line before the “That’s all, stop editing!” comment:

Reinstall WordPress core files: If none of the above steps resolve the issue, you can try reinstalling the core WordPress files. This process will replace the WordPress files with fresh copies while preserving your content and settings. Make sure to take a backup of your site before proceeding.

I tried all these things but none of them worked so I started searching for more in WordPress community posts and community posts was full of comments so I tried getting the solutions from there, below are few of them

  • Try resetting your custom permalinks back to the default setting and renaming your WordPress .htaccess file.
  • Add classic-editor plugin to Avoid this error (I was able to publish the blog but it was showing 404 error when I opened it.)

None of them worked for me and if you still didn’t found any solution then you can seek expert advice.

Conclusion:

Simply deactivate your plugins for some time and your issue will be solved, because I have encountered this error many times and the solution was same. If you still face this issue comment down below we will do our best to help you.