If you’re reading this post, then you’re likely seeing the red WordPress error box reading, “Updating failed. The response is not a valid JSON response.”
Not a valid JSON response
Sadly, this error could be many, many things.
Resave Permalinks
In your troubleshooting, the first and easiest step to try is resaving your permalinks. To do so, simply navigate to Settings > Permalinks. You don’t need to change any settings; just click Save Changes. Many report that this resaving fixes the issue; however, this did not solve my Updating Failed error.
I found this WordPress support thread and reviewed it for help. Again, it didn’t solve my issue, but it might solve yours. Changes to the htaccess file were required.
Check if your hosting has a WAF
What worked for me: The WordPress blog that was erroring was hosted on WPMU DEV’s web hosting which has a Web Application Firewall (WAF). You can learn more about what and how the WPMU DEV WAF works in the Documentation Tools section 5.2 WAF.
During troubleshooting, the WPMU Dev’s technician found a lockout by the firewall. This lockout was preventing my post from saving. The solution was disabling the lockout rule in the firewall. Once disabled, the page was able to be saved.
Check Hosting Logs > WAF Log
In my case, the offending post mentioned the term “wp-config.php” file. The term wp-config.php was caught by one of the WAF rules as “matched data.” As this usage was intentional and not malicious, it was decided safe to exclude the rule be disabling it. The steps followed are shown below.
Happy WordPressing!
Once the WAF rule was disabled, the post was saved with no issue. Exploring the hosting logs was key to getting past the WordPress error, “Updating failed. The response is not a valid JSON response.”
I hope this helps you too!