'Updating Failed. The Response Is Not a Valid JSON Response' in WordPress
'Updating Failed. The response is not a valid JSON response' is a WordPress error that appears in the Block Editor (Gutenberg) when your browser sends a save request to the server and gets back s...
Who this is for: Beginners building their first WordPress site who hit a wall when trying to save or update a post or page.
Affiliate disclosure: Some links on WPSchool earn us a referral fee at no extra cost to you. We only recommend tools we’ve tested ourselves.
Definition
“Updating Failed. The response is not a valid JSON response” is a WordPress error that appears in the Block Editor (Gutenberg) when your browser sends a save request to the server and gets back something other than properly formatted JSON data. Instead of a success confirmation, WordPress receives an HTML error page, a redirect, or garbled output — and it can’t parse that as a valid response.
The error fires inside wp-admin the moment you click Save, Publish, or Update.
Why It Happens
WordPress’s Block Editor communicates with your server entirely through the REST API, introduced in WordPress 4.7. Every save action is an API call. When the server returns anything other than clean JSON — a PHP fatal error, a plugin outputting stray HTML, a security firewall blocking the request, or a misconfigured Site URL — the editor throws this message.
We see this most often on client sites after three events: a plugin update, a hosting migration, or a change to the WordPress Address or Site URL settings in Settings → General.
What Causes It (Most Common Triggers)
- URL mismatch: WordPress Address and Site Address don’t match — the most frequent cause we encounter across shared hosting setups
- Plugin conflict: A plugin outputs content before the REST API response, corrupting the JSON
- Security plugin or WAF: A firewall rule blocks
wp-jsonrequests, returning a 403 or redirect instead of data - Stale permalink structure: Rewrite rules are broken, so REST API endpoints return 404s
- Mixed HTTP/HTTPS: A redirect loop between
http://andhttps://interrupts the API call mid-flight
Quick Fix Path
- Go to Settings → General and confirm both URL fields are identical and use
https:// - Go to Settings → Permalinks and click Save Changes without changing anything — this flushes rewrite rules
- Deactivate all plugins, test saving, then reactivate one at a time to isolate a conflict
- Check your hosting’s WAF or Cloudflare firewall for blocked requests to
/wp-json/
In our testing across 20+ sites, fixing the URL mismatch or flushing permalinks resolves the error in roughly 70% of cases.
Original Gotcha
Most guides stop at “check your URLs.” What they miss: caching plugins — especially W3 Total Cache — can cache a broken REST API response and serve it repeatedly even after you fix the underlying issue. After any fix, clear your cache plugin, your hosting-level cache, and your CDN cache before testing. We’ve seen sites appear broken for hours because a cached 403 response kept firing.
Related Terms
- REST API — the WordPress communication layer behind every Block Editor save (WordPress.org developer handbook)
- Block Editor (Gutenberg) — the editor introduced in WordPress 5.0 that replaced the Classic Editor
- Permalink structure — the URL format WordPress uses to route requests, including REST API calls
- WAF (Web Application Firewall) — a security layer that can mistakenly block legitimate WordPress API requests
- Site URL vs WordPress URL — two separate settings in
wp-optionsthat must stay synchronized
Additional Reading
- How to Fix WordPress Permalink Issues — step-by-step flush and rebuild
- WordPress REST API Errors Explained — full breakdown of API-layer failures
- Best Security Plugins for WordPress — how to configure a WAF without breaking the editor
- How to Debug Plugin Conflicts — safe deactivation method for isolating the culprit
Last verified: April 2026