Invalid JSON Response Error in WordPress: 8 Fixes

Fix "Updating failed. The response is not a valid JSON response" in WordPress. Free API checker, 8 tested fixes and what each result means for your site.

Share this post
7 min read

Last updated December 5, 2026

The “Updating failed. The response is not a valid JSON response” error has a simple meaning. The editor asked your server to save, but the reply was not data.

Most often, a broken permalink setting, a security rule or a mixed http and https setup is to blame.

Start by re-saving your permalinks. Then use the free checker below to see what your site really sends back.

Key Takeaways

  • The block editor saves posts through the WordPress REST API, says WordPress core.
  • The API lives at /wp-json/ on sites with pretty permalinks.
  • With plain permalinks, WordPress uses ?rest_route=/ instead.
  • A web page, a 404 or a 403 at the API address breaks saving.
  • WordPress says not to use debug tools on live sites, only for testing.

Digieh WordPress REST API checker

Digieh tool. Your browser asks your site for its public API index, the same address the editor uses. It sends no login and saves nothing. A security plugin or firewall can block this test even when the editor works.

What the test can and cannot see. The checker sees your site from the outside, like a visitor. A rule that only blocks logged-in editors will not show here, so also run Site Health in your dashboard.

What Does “Not a Valid JSON Response” Mean?

When you click Update, the editor does not reload the page. It sends your post to the server in the background. Then it waits for a reply in a data format called JSON.

If the reply is a web page, an error page or nothing at all, the editor cannot read it. It then shows the “not a valid JSON response” message.

WordPress core describes the REST API as one way WordPress talks to the server. It names the block editor as one tool that relies on it to display and save posts.

Source: WordPress core ticket 54617, Site Health REST API messages, read December 5, 2026.

You may also see the same error as “Publishing failed” or when you upload an image into a block.

What Causes the Invalid JSON Response Error?

CauseWhat you noticeFirst fix
Broken permalinks or rewrite rulesThe API address shows a 404Re-save Settings, then Permalinks
Security plugin or firewallThe API address shows 403Allow the wp-json path
Mixed http and httpsSite works, saving failsMatch both site address fields
Plugin conflictError started after an updateTurn plugins off one by one
PHP error on the serverThe API address shows 500Check the debug log
Cache or maintenance pageAPI returns a web pageExclude wp-json from the cache

Source: Digieh checks based on WordPress REST API discovery docs and WordPress core Site Health messages, December 5, 2026.

6 causesDigieh list of the common reasons the editor gets a bad reply.

How Do You Use the Checker?

  1. Type your site address, such as https://example.com.
  2. Click Check my site.
  3. Read the result for the pretty address /wp-json/.
  4. If that fails, read the result for the plain address ?rest_route=/.

If the plain address works but the pretty one fails, your permalinks or rewrite rules are the problem. That is the most common pattern we see.

Fix 1: Have You Re-Saved Your Permalinks?

This rebuilds the rewrite rules that make /wp-json/ work. It is safe and takes seconds.

  1. In your dashboard, go to Settings, then Permalinks.
  2. Do not change anything.
  3. Click Save Changes.
  4. Go back to the editor and click Update again.

The WordPress docs note that sites without pretty permalinks use a different API address. Re-saving helps WordPress serve the right one.

Source: WordPress REST API discovery, read December 5, 2026.

For more on this setting, read our guide on how to change WordPress permalinks.

Fix 2: Do Both Site Address Fields Match?

Go to Settings, then General. The WordPress Address and the Site Address should both start with the same https:// and use the same domain.

If one says http and the other https, the editor may call the wrong address. Fix the mismatch, save, and log in again.

Source: WordPress docs on changing the site address, read December 5, 2026.

Seeing padlock warnings too? Our mixed content guide covers the full fix.

Free updates

Join the Digieh list

Be the first to know when our weekly brief launches.

No spam. Unsubscribe anytime. Read our Privacy Policy.

Fix 3: Is a Security Plugin or Firewall Blocking It?

Some security tools block the API to stop bots. That also stops the editor from saving.

  • Look in your security plugin for a setting that disables or limits the REST API.
  • Allow the wp-json path for logged-in users.
  • Check your host or content delivery network (CDN) firewall logs for blocked editor requests.
  • Test again after each change.

If the checker shows a 403, our WordPress 403 Forbidden guide explains where that block can come from.

Fix 4: Is a Plugin Causing the Conflict?

A plugin can add stray text to the API reply, which breaks the data. This often starts right after an update.

  1. Turn off all plugins except the ones you need to log in.
  2. Try to update a post.
  3. If it works, turn plugins back on one at a time.
  4. Test after each one until the error returns.

When you find the plugin, update it, replace it or contact its developer. Do this on a staging copy if the site gets a lot of traffic.

Fix 5: Does the Debug Log Show PHP Errors?

A PHP warning printed into the reply is enough to break it. The debug log shows these messages.

WordPress says WP_DEBUG_LOG saves errors to wp-content/debug.log. Setting WP_DEBUG_DISPLAY to false hides errors from the page.

Source: Debugging in WordPress, read December 5, 2026.

Turn it off after. WordPress says not to leave debug tools on a live site. They are meant for local testing and staging.

If the log shows a fatal error, see our guide to the WordPress 500 error.

Fix 6: Is the .htaccess File Broken on Apache?

On Apache servers, the .htaccess file holds the rewrite rules. If it is missing or damaged, the API address returns a 404.

  1. Make a copy of your current .htaccess file first.
  2. Check that it has the standard WordPress block of rewrite rules.
  3. Re-save your permalinks so WordPress can write the rules again.

Source: WordPress docs, Apache web server and .htaccess, read December 5, 2026.

Fix 7: Is Your Cache Storing the API?

A page cache should never store API replies for logged-in editors. If it does, the editor can get an old page instead of fresh data.

  • Clear your cache plugin and your host cache.
  • Exclude /wp-json/ from page caching.
  • Turn off any maintenance mode plugin that may still be active.

Fix 8: What Does Site Health Say?

Go to Tools, then Site Health. If the API is broken, WordPress shows a notice that the REST API encountered an error.

The notice lists the address it tested and the reply it got. That detail often names the exact problem, such as a timeout or a blocked request.

Source: WordPress core ticket 54617, read December 5, 2026.

Try this today. Run the checker above, then run Site Health. If both pass, the problem is likely a plugin or a rule that only affects logged-in users.

Why Does the Error Appear Only When Uploading Images?

Image uploads also go through the API. A file that is too large or a blocked file type can return an error page instead of data.

Check our guides on the upload size limit and on the file type not permitted error.

Can You Just Switch to the Classic Editor?

The Classic Editor plugin saves posts with a normal form instead of the API. So the error may vanish.

That hides the problem but does not fix it. Other features, apps and plugins also use the API, so it is better to find the real cause.

Which fix solved your error?

  • Re-saving permalinks
  • Security plugin
  • A plugin conflict
  • Still broken
  • Not sure

If Site Health also shows a loopback warning, read our fix for a failed loopback request. The same block often breaks both.

Need to clear your browser cache? See how to clear the cache in Chrome, with pictures.

Test Yourself

Where is the REST API on a site with pretty permalinks?

  1. /wp-admin/api/
  2. /wp-json/
  3. /rest/

The WordPress docs show the API root at /wp-json/.

What is the safest first fix for this error?

  1. Delete the database
  2. Re-save permalinks
  3. Reinstall WordPress

Re-saving permalinks rebuilds the rewrite rules and changes no content.

Frequently Asked Questions

What does “The response is not a valid JSON response” mean?

The editor sent your changes but did not get readable data back from the server.

Will I lose my post?

Usually not. Copy your text somewhere safe first, then fix the cause and update again.

Does re-saving permalinks change my links?

No. If you click Save Changes without picking a new structure, your links stay the same.

Can a security plugin cause this error?

Yes. If it blocks the wp-json path, the editor cannot save.

Conclusion

Re-save your permalinks, check your site address fields and run the checker. If the API returns a page or an error code, follow the matching fix above.

Editor’s Note

This guide is accurate as of December 5, 2026. Facts come from the WordPress developer docs and WordPress core. Our checker reads only your public API index and stores nothing.

Spot an error in this article? Please contact us at support@digieh.com or read our Corrections Policy.

Keep exploring

Your next read is waiting

Found this useful?

Share this post
Avatar photo

Syed Wasif Raza

Syed Wasif Raza is the founder and editor of Digieh. He writes about health, food, lifestyle, news and sports in plain, easy English. Every guide he publishes is checked against official sources such as government and health agency pages. Connect with him on LinkedIn.

Articles: 1070

Leave a Reply

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