Fix WordPress “The response is not a valid JSON response” Error

and user-visible…

The “not a valid JSON response” error in WordPress usually means the editor cannot complete a REST API request. The fix is to isolate whether the failure is caused by permalink, rewrite, SSL, plugin conflicts, or server rules.

1) Verify site URL and SSL consistency

  • Both WordPress Address and Site Address should use the same host and HTTPS state.
  • If you use Cloudflare, ensure origin and edge SSL settings are aligned.

2) Reset permalinks

Go to Settings -> Permalinks and click Save. This rebuilds rewrite rules.

3) Check REST endpoint directly

curl -I https://www.wordpresshosting.solutions/wp-json/
curl https://www.wordpresshosting.solutions/wp-json/

If this fails, the editor will fail too.

4) Test for plugin/theme conflict

wp plugin deactivate --all
wp theme activate twentytwentyfour

Then re-test editor updates. Re-enable components one-by-one to find the trigger.

5) Review server and firewall rules

  • Confirm no rule blocks /wp-json/.
  • Check WAF/Firebase/Fail2Ban patterns that might block admin requests.
  • Inspect Apache/Nginx logs for 403/500 on REST calls.

6) Validate file permissions

Incorrect ownership can break media and post updates.

sudo chown -R www-data:www-data /var/www/wordpresshosting_sol
sudo find /var/www/wordpresshosting_sol -type d -exec chmod 755 {} ;
sudo find /var/www/wordpresshosting_sol -type f -exec chmod 644 {} ;

Most sites recover after fixing rewrite + REST access + mixed SSL settings.

Validation

Re-test key user paths and review service logs after each change.

Further reading: WordPress Troubleshooting Guide

Related posts:

Leave a Reply

Your email address will not be published. Required fields are marked *