The error “Updating failed. The response is not a valid JSON response.” in WordPress usually means the editor cannot communicate correctly with your server. This is very common and usually caused by permalinks, plugins, security rules, or server configuration.
Follow these fixes in order (most cases solved in Step 1 or 2).
Table of Contents:
Refresh Permalinks (Most Common Fix)
- Go to Dashboard → Settings → Permalinks
- Click Save Changes (without changing anything)
This rebuilds WordPress rewrite rules and fixes many JSON errors.
Check Site URL (HTTP vs HTTPS)
Sometimes the editor sends requests to a different URL.
Go to:
Settings → General
Make sure both are the same:
WordPress Address (URL)
Site Address (URL)
Example (correct):
https://moralstory.in
https://moralstory.in
NOT:
http://moralstory.in
https://moralstory.in
Disable Security / Cache Plugins
Temporarily disable plugins like:
- Wordfence
- LiteSpeed Cache
- WP Rocket
- All In One Security
Then try updating the post again.
Check REST API
Open this in browser:
https://moralstory.in/wp-json/
If it shows JSON text → REST API is working.
If it shows 403 / error / blank page → hosting or security blocking it.
Fix .htaccess
Open .htaccess in root and replace with:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
Increase PHP Limits
Add in wp-config.php
define('WP_MEMORY_LIMIT', '256M');Cloudflare / Firewall Issue
If you use:
- Cloudflare
- hosting firewall
Disable Bot protection / ModSecurity temporarily.
Console Error Check
Press:
F12 → Console
If you see:
403
500
rest_cookie_invalid_nonce
tell me the error.
Quickest Fix (Usually Works)
Do these 3 steps first:
- Settings → Permalinks → Save
- Clear cache plugin
- Check https vs http