“Not a valid JSON response” in WordPress: what to do when a post won't save
The message “Updating failed. The response is not a valid JSON response” means the WordPress editor didn't get a proper reply when saving your post. The usual causes are broken permalinks, a mismatched site address, a security plugin or firewall blocking the REST API, and HTTPS problems. Save your content first, then work through the checks in order.
Author: The TellMyShop team. A guide for WordPress site and WooCommerce store owners: the cause, the manual fix and the same work in a chat conversation.
Last updated: · 6 min read
Rescue your content first
Before you change anything, secure what you've written. The error is about saving, not about the text in the editor window.
- Don't close the tab or reload the page.
- Select all the content in the editor, copy it and paste it into a text file or document.
- Copy the title separately and, if you changed it, the Google description from your SEO plugin's panel.
- Only now close the editor and start looking for the cause.
Once it's fixed, you paste the content back. It takes a minute and saves you rewriting the post from scratch.
Why the editor needs a JSON response
The block editor saves posts through the REST API, an internal WordPress address it talks to in JSON format. The WordPress REST API handbook describes it. When something along the way replaces the reply, such as a redirect from http to https, a server error page, a firewall block or a PHP warning stuck onto the response, the editor can't read it and shows this message.
That's why one message has many possible causes. It helps to work out whether the error affects every post or just one.
| Symptom | Most likely cause | Where to look |
|---|---|---|
| No post or page will save | permalinks, site address, HTTPS | Settings → Permalinks, Settings → General |
| The error started after installing or updating a plugin | that plugin | Plugins → Installed Plugins |
| Everything saves except one post | the firewall blocks part of the content, or a large image | the content of that post, firewall settings |
| The error appeared after moving to HTTPS or changing domain | the Site Address and WordPress Address differ | Settings → General |
| Site Health reports a REST API error | security plugin, hosting firewall, Cloudflare | Tools → Site Health |
| The error appears when uploading an image to a post | file size or time limit on the server | hosting |
Rescue guide: six steps in order
After each step, try saving the post. When it works, stop there.
- Save your permalinks again. Go to Settings → Permalinks and click Save Changes without changing anything. WordPress refreshes its address rules and, on Apache servers, usually the .htaccess file too.
- Compare the two addresses. In Settings → General, the WordPress Address and Site Address fields should use the same protocol and domain, for example both with https and www, or both without www.
- Look at Site Health. Go to Tools → Site Health. If there's an item about the REST API, expand it. It often includes an error code that points to the culprit, such as 403 for a firewall. We explain the other items in our post on WordPress Site Health.
- Temporarily deactivate your security and cache plugins. These are the ones that most often intercept editor requests. If saving works, add an exception for the REST API in that plugin's settings or report the problem to its author.
- Check the firewall outside WordPress. Cloudflare or your host's firewall can block saves. Hostinger's guide to this error explains how to check it using the firewall's learning mode.
- Deactivate the remaining plugins one by one. If nothing helped, look for a conflict. Start with the plugins you added or updated most recently.
Many guides, including WPBeginner, also suggest switching to the Classic Editor for a while. That's a workaround: the post will save, but the REST API error stays and can break other things.
When to hand it over to your host or a developer
If the error is still there after six steps, the cause usually lies deeper: in the server rules, the certificate, limits, or theme code that adds something to every response.
Give your host the page address, the exact time of your last attempt to save and what you've already checked. Ask for the server error log and firewall entries from that time. A developer will turn on error logging to a debug.log file with on-screen display switched off, as the WordPress debugging documentation describes, and check what breaks the response.
If the whole site shows a server error instead of this message, go to our guide on the WordPress 500 error.
How the chat helps you find the cause
The TellMyShop plugin for WordPress and WooCommerce connects your chat (Claude or ChatGPT) to your site by its own route, separate from the editor. If that connection works, the chat can help with the diagnosis even when the editor won't save posts. If a firewall blocks the whole REST API, the connection may not work either, and then you're left with the steps above.
In the free TellMyShop Free version, the chat reads Site Health, grouped PHP and WordPress errors from recent days, and the plugin list with versions and available updates. From that, it points to the most likely cause.
You: Since yesterday I get “The response is not a valid JSON response” when saving posts.
Your chat: Site Health reports a REST API error with code 403. Since yesterday the logs have shown a repeated warning from the Example Security plugin on editor requests. No other plugins report errors.
Your chat: Most likely this plugin is blocking saves from the editor. I suggest deactivating it as a test. Preview:
Risk: during the test the site doesn't have this protection. You can undo it from the change history.
You: Yes.
Your chat: Deactivated. Site Health no longer reports a REST API error. Try saving the post. If it works, report the problem to the plugin's author or add an exception in its settings, then activate it again.
old version: Example Security: active
new version: Example Security: inactive
The plugin name and error code in this conversation are examples. Deactivating a plugin works in TellMyShop Pro with the Plugins switch on, which lasts 24 hours and requires a database backup from today. The chat always shows a preview and waits for your approval. It doesn't change .htaccess, wp-config.php, the certificate or the server firewall. It can save permalink settings only with the Theme switch on, and in most cases you'll do that faster yourself with one click.
You'll find the details of each version on the TellMyShop for WordPress page and in the pricing. You can download the free version from the TellMyShop Free page.
Questions and answers
What does “The response is not a valid JSON response” mean?
The editor sent your post to WordPress and expected a reply in JSON format, but got something else: an error page, a redirect or a PHP warning. The message itself doesn't say what got in the way. You find the cause step by step, starting with permalinks and plugins.
Have I lost the changes in my post?
Don't close the editor tab until you've saved the content somewhere. Copy it into a text file and paste it back once the problem is fixed. WordPress often keeps an autosave too, which it offers when you reopen the post.
Why does the error only appear on some posts?
Usually because a firewall blocks content that looks suspicious, such as a code snippet or an embedded script. Another cause is a large image or a server time limit on a long post. Check how this post differs from the ones that save normally.
Can I just switch back to the Classic Editor?
The Classic Editor saves posts a different way, so the error usually goes away. The REST API problem stays on the site, though, and can break other things, such as plugins and scheduled tasks. Treat it as a workaround for a few days and still find the cause.
Will the TellMyShop plugin fix this error?
It will help you find the cause. In the free TellMyShop Free version, the chat reads Site Health, error logs and the plugin list. In TellMyShop Pro, with the Plugins switch on, it can deactivate a suspect plugin after a preview and your approval. It won't change .htaccess, the certificate or the server firewall.
WordPress is a trademark of the WordPress Foundation. WooCommerce is a trademark of Automattic Inc. Claude is a trademark of Anthropic PBC. ChatGPT and OpenAI are trademarks of OpenAI. TellMyShop is not affiliated with these companies.