This error means the WordPress editor asked your site's REST API to save your post, but it got back something other than the clean data it expected — usually an error page or a redirect. Fix it by matching your two site URLs, resetting permalinks, and unblocking the REST API. Most people solve it in a few minutes.
http vs https.yoursite.com/wp-json/ to see whether the API returns real data or an error.You write a post or page, click Update or Publish, and a red bar appears: "Updating failed. The response is not a valid JSON response." Sometimes it reads "Publishing failed." instead. The block editor seems stuck, and you worry your work is lost.
Take a breath — this is almost always fixable, and your content is normally saved as a draft even when the message appears. This guide is for anyone using the WordPress block editor (Gutenberg) who hits this wall while saving. It sits under our Server Errors guide, so if you land here with a different error, start there.
Do one quick test first. Open a new browser tab and go to yoursite.com/wp-json/ (swap in your real domain). If you see a wall of structured text starting with {"name":, the REST API is working and the cause is more specific — likely a URL, SSL, or plugin issue. If instead you see a 404 page, a redirect loop, a login page, or a server error, you've found the lead: something is blocking the API.
Next, check Settings → General and note whether WordPress Address (URL) and Site Address (URL) match and both use the same protocol. A single http where the other says https is the classic trigger.
/wp-json/ is blocked by a server rule such as ModSecurity, a firewall, or a CDN you don't control, that's on your host's side — you'll need to ask them to allow REST API requests.The block editor doesn't reload the whole page when you save. Instead, it quietly sends your content to the site behind the scenes and waits for a short, machine-readable reply. Two terms explain the error.
REST API is the doorway WordPress uses to send and receive data without a full page reload. When you click Update, the editor knocks on that door at an address like /wp-json/wp/v2/posts and hands over your changes.
JSON (JavaScript Object Notation) is the simple, structured text format the API is supposed to reply in — the "valid JSON response" the message asks for. When the editor gets JSON, it knows the save worked.
The error appears when the reply is not JSON. Instead of clean data, the editor receives an HTML error page, a redirect to another URL, a login screen, or a blank response. It can't read that, so it reports the only thing it knows for sure: the response is not valid JSON.
Work from the most common, lowest-risk cause down to the host-level ones. The table maps each cause to the fix and who owns it.
| Likely cause | Fix | Whose side |
|---|---|---|
| Mismatched or wrong site URLs (http/https) | Match both URLs in Settings → General | You |
Broken permalinks or .htaccess | Reset permalinks; check rules | You |
| SSL or mixed-content issues | Fix the certificate and http resources | You |
| Security plugin or firewall blocking the API | Deactivate and retest one at a time | You |
ModSecurity or a server rule blocking /wp-json/ | Ask your host to allow REST requests | Host |
| A CDN interfering with API calls | Bypass or configure the CDN for /wp-json/ | You / host |
https if you have an SSL certificate.yoursite.com/wp-json/ in a new tab. It should return structured JSON, not an error page. If it errors, that response tells you what is blocking the API and is your strongest lead.http resources such as images or scripts loading on an https page — which can break secure API calls..htaccess file. Look for custom rules that block or redirect /wp-json/. If you're unsure, our 403 and 404 fix guide covers reading these rules safely./wp-json/. Only the host can adjust those.wp-config.php or the wp_options table in your database if you get locked out.The other frequent mistake is assuming the editor itself is broken and reinstalling WordPress. The editor is fine; the message is really about the REST API and, often, SSL. Chasing the wrong culprit wastes time. Also avoid deleting your .htaccess file outright — reset permalinks to regenerate it cleanly instead.
Keep your two site URLs and your SSL setup consistent — always https once you have a certificate, with no stray http links in your content or theme. When you move a site or switch to SSL, update both URL fields together and search for old http references.
Be careful with the lockdown settings in security plugins and firewalls. Options that "disable the REST API" or restrict it to logged-in users can break the editor. Test saving a post right after you change those settings, so you catch a problem while you still remember what changed. For deeper server-side tuning, see our PHP settings guide.
It means the block editor asked the WordPress REST API to save your post and expected a tidy, structured reply in JSON format. Instead it received something else — an HTML error page, a redirect, or a blank response — which it can't read, so it reports the response as invalid.
Saving is when the editor talks to the REST API in the background. Reading or writing content in the editor doesn't need that round trip, so everything looks normal until you click Update or Publish and the blocked or broken API call fails.
Visit yoursite.com/wp-json/ in a browser. A working API returns structured JSON text beginning with {"name":. If you get a 404, a login page, a redirect, or a server error instead, the API is blocked or misrouted, and that is your main lead.
Yes. Many security and firewall plugins can disable or restrict the REST API as a hardening measure, which stops the editor from saving. Deactivate them, retest, then reactivate one at a time and adjust the setting that blocks REST requests.
It's usually your site — a URL mismatch, permalink issue, SSL problem, or a plugin you can change yourself. It's your host when a server rule like ModSecurity, a server-level firewall, or a CDN they manage blocks /wp-json/. If /wp-json/ errors even with plugins off, ask your host.
Usually not. WordPress typically keeps your latest text as a draft or autosave even when the save message fails. Copy your content to a safe place before troubleshooting anyway, so you're covered no matter what.
"The response is not a valid JSON response" is a REST API message, not a broken editor. Match your two site URLs, reset permalinks, test yoursite.com/wp-json/, fix SSL and mixed content, and rule out security plugins — then ask your host if a server rule blocks the API. Back up before you touch any URL. If you're now dealing with a different error code, head back to our Server Errors guide to find the right fix.
.htaccess fileThe editorial team behind the Bitrich777 Hosting Help Center — practical, tested guides on web hosting, WordPress, servers, DNS, SSL, email, security and migration. Every walkthrough is reproduced on a live host before it is published.
View all guides by the Hosting Team Spotted an error? Tell us