6 Fixes for “the response is not a valid JSON response” Error in WordPress

You are creating content in the WordPress editor but the document fails to update. In fact, you see an error message that says “Updating failed. Error message: The response is not a valid JSON response.” Before you panic, let me assure you that this error can be resolved easily so you don’t lose your hard work.

This error is one of the common WordPress errors that users encounter on their sites.

Why does “the response is not a valid JSON response” error occur?

There could be multiple reasons why this error occurs. This post delves into each reason and offers multiple solutions to solve the problem.

Before you try anything else, you should try resetting your permalinks to resolve the invalid JSON response error. Navigate to Settings > Permalinks in your WordPress dashboard. Then ensure that the correct permalink setting is selected and click the Save Changes button.

Now try updating a page. The error should be fixed but if it still occurs, try out the solutions below.

2. Disable the Block editor and switch back to Classic editor

WordPress classic editor
Old is still Gold in WordPress

The error “Updating failed. Error message: The response is not a valid JSON response.” is overwhelmingly seen in the new Block editor called Gutenberg.

The easiest way to resolve the updating error is by disabling Gutenberg and switching back to the Classic editor. As they say, old is Gold.

You can install the Classic Editor plugin for this. Once you have activated the plugin, try to save your posts. You should not see any error message now.

But what if you still want to use the block editor?

Nice question. It could be that reverting to the classic editor is not an option for you. In that case, you should follow what we are doing on PassionWP. With the classic editor plugin installed and activated, navigate to Settings>Writing.

Now select the Classic Editor as the “default editor for all users” option, save your changes, and clear your website cache. Right after this, select the Block Editor as the default editor and again save the changes.

Now try editing an existing post or create a new post with the block editor. You should not encounter the JSON response error. However, it could be that the editor fails to automatically save your changes.

In this event, press Ctrl + S (Cmd + S for Mac) to manually save your changes. This solution works for us and we are using the block editor without encountering the JSON response error.

WordPress Error Fixing Service

3. Mixed content error due to the use of SSL certificate

Another common reason for this error is the use of a secure socket layer (SSL) certificate (HTTPS) on your WordPress site. Using an SSL certificate can result in some content being delivered non-securely on HTTP protocol even while the rest of the content is delivered in a secure manner over HTTPS protocol.

This results in a mixed content error in which both https and https content is transmitted at the same time to the web browser, usually Google Chrome.

How to solve the Mixed Content Error in WordPress?

We investigated the mixed content error and noticed that it is linked to the use of the Really Simple SSL plugin that is used by over 3 million WordPress users to configure HTTPS on their websites.

To resolve the “the response is not a valid JSON response” or mixed content error, navigate to Settings > SSL. This will open the plugin’s settings. Now click on the Settings tab.

You should do the following two things here:

  1. Ensure that the “Mixed content fixer” option is turned on. This prevents mixed content problems on your website that we discussed above.
  2. Next, you should turn on the “Use an alternative method to fix the mixed content” option. This will ensure that “the response is not a valid JSON response” error does not erupt abruptly while editing.
How to fix the response is not a valid JSON response error in WordPress
Really Simple SSL settings

After saving the changes, go back to the post you were working on and try saving your post or page. You should no longer experience the response is not a valid JSON response error.


4. Plugin conflict

The more plugins you use on your WordPress site, the higher the chances of conflict between plugins. Some of these conflicts can result in invalid JSON response errors as well.

I have witnessed this issue on websites running a high number of plugins, say more than 40. But it’s not just the number of plugins that matter. Rather, some plugin files might be causing the JSON bug on your website.

For instance, on a client’s site, the Yoast SEO plugin was causing the JSON response error.

So, in order to rule out any plugin conflict, you should deactivate all the plugins on your website. If required, use the Health Check and Troubleshooting plugin to deactivate the plugins in the backend while the front end remains the same for your visitors.

If the JSON response error disappears when you deactivate all the plugins means that one of the plugins was causing the error. Now, you should activate the plugins one by one. If the error recurs on activating a particular plugin implies that this plugin was the culprit.

5. WordPress REST API conflict

The WordPress admin backend uses the REST API to communicate with the server. If there is any conflict with this API, WordPress won’t be able to connect with the server and will instead display the JSON response error.

In order to identify if the REST API problem is indeed causing the problem, try editing one of your posts and saving it. Once the invalid JSON error is displayed, right-click the mouse button and then click Inspect to open Chrome’s dev tools.

Now under the Console tab, check whether any REST API error is displayed. If it is, then the REST API conflict is indeed the cause.

The best solution to this is to contact your web host since REST API errors are mostly caused at the server level. If you’re using a cache plugin like LiteSpeed Cache, you should disable the setting to cache the REST API and try saving the post again.

Finding this solution required considerable effort and time. Consider rewarding me with a coffee!

6. Alternative solutions to the response is not a valid JSON response error

Deactivate all the plugins on your site and edit the content normally. If you’re using the Really Simple SSL plugin then deactivate this plugin first. Subsequently, try saving the document. If you are able to save it without facing any errors, re-activate the plugins one by one to check which plugin was causing the error.

There is another solution you can try to fix the response is not a valid JSON response error in WordPress.

Navigate to Settings > Permalinks. Change the permalink structure from post-name or the current structure to Plain i.e. https://yoursite.com/?p=123. Now try saving your post/page. The problem should have been resolved.

Fix the response is not a valid json response error by changing the permalink
WordPress permalinks settings

But try this solution if all other methods fail as changing the permalinks will result in huge SEO issues on a live website and you will also need to add multiple redirects.

We discussed 6 possible solutions to the response is not a valid JSON response error in WordPress. I hope one of these methods worked for you. If it did, let me know in the comments below. If it didn’t, post your specific problem so others can suggest different solutions.

You can also check out our WordPress Error Fixing Service to fix the invalid JSON response error for you.

Download the WordPress SEO eBook

Go from WordPress SEO Zero to Hero in no time. Also receive 2 Bonus PDFs with this free eBook.

Give it a try. You will thank yourself later.

About Trishan Mehta

Trishan Mehta is a WordPress fanatic since 2009. When not WordPressing, he is busy exploring hidden natural getaways whenever he can grab an opportunity. You can grab his WordPress SEO eBook to get up to speed with WordPress SEO.

65 thoughts on “6 Fixes for “the response is not a valid JSON response” Error in WordPress”

    • Hello Michelle,

      So sorry to hear that none of the solutions worked for you although the classic editor solution should have worked. Do you have the Really Simple SSL plugin installed on your blog?

  1. THANK YOU!! As this was so frustrating.

    Adding the classic editor back did the trick and forever will it stay.

  2. After everything else… the permalinks was the fix. Thank you. Now I need to go back in and add Plugins, photos that were all deleted in the problem solving process. 🙁

  3. Oh My Goodness! Thank you so much for this guide, I was REALLY panicking already, because I recently changed from the default GoDaddy nameserver to the Cloudflare one

    And then I also activated this SSL thingy that comes with Cloudflare and suddenly I can’t edit posts!

    After reading this guide, I tried installing the “Really Simple SSL” plugin in my wordpress, enabled it and it worked! Thank you so much! You’re a lifesaver.

    • Hello Brad,

      You’re welcome. I guess the WordPress team has some serious work on their hands otherwise we will see a continuous switch back to the classic editor.

  4. hi

    I can not change Parmalinks because i am using internal links of my posts.

    Classic editor als can not use because i use “reusable blocks” and “Colors” in Blocks in my posts.

    SSL are perfect working

    you have any other suggestion ?

  5. I had exactly this problem. Nothing would save and I couldn’t access my media library.

    The cause was I had accidentally left a character at the top of my functions.php file before the opening bracket.


    As soon as I removed it, everything started working again.

  6. Thank you Trishan! For me it was the solution with the classic editor – then I switched it off to keep using Gutenberg… The problem with JSON seems to be gone… Again thank you for your helpful post!!!

  7. None of your “solutions” made sense to me since they all had a down side. I did not want to lose the functions that had to be turned off.

    I changed the permissions on my .htaccess file and the problem of ““the response is not a valid JSON response” went away. See setting here: https://wordpress.org/support/article/changing-file-permissions/#htaccess-permissions

    I did find your blog post interesting, since I learn about some other options. I am sending this to you in case you find it useful and once you confirm that I am correct, you can update your blog post.

    I did not provide my email address and name, since you don’t need to credit me.

    • Hello FYI,

      Thanks for sharing your unique ‘solution’. It is more of an exception than the norm since most readers have found one of the solutions listed in this post workable for them. So there’s no need to update the post as of now.

  8. Hi Trishan,
    I visited my blog yesterday after letting it rest unattended for 3 years (wow! didn’t realize so much time had passed) and discovered the 404 error for every page and post link. Yikes! Something to panic about instead of Covid-19.

    Installing the classic editor plugin resolved the issue immediately. Thank you so much! I hoped the fix would be simple and it was. Unfortunately, the posts haven’t been showing for a long time.

    Oh, well. Pressing on and moving forward.

    • Hello Cheryl,

      Wow! You really aren’t serious about your blog if you log in after 3 years. But, I am glad that the solution worked out for you. You sure have a funny bone in there.

  9. None worked for me..
    I am really helpless now.
    Tried all the options and also my ssl is on cloudflare.
    When i tried to change to classical editor, then after clicking publish/update it show a blank page.
    Can you help me in this?

    • Did you clear the Cloudflare cache? Also, remember that after clearing the cache, it takes some time to rebuild the cache during which your site may appear broken.

  10. Thank you! I saved my post with Ctl + S then went and then tried the classic editor switch-over and it worked! Thanks so much for this tutorial.

  11. Hello Trishan,

    Thank you for all your great tips! I tried all of them (including installing Really Simple SSL) except for the permalinks (too scared to try that one), and unfortunately none of these tricks worked. :’-(

    I am able to update text with no problems. I only get this invalid json response error when try to upload images, in both Classic Editor or Block Editor. Perhaps I should try and upload an image using a different browser? (I’m using Google Chrome).

    I tried calling wordpress.org support, and they want me to pay at least $125 up front to fix the problem. They told me it’s a plug in that caused it, and deactivating the plug in won’t help (I did try this, and they are right about that).

    I’m at wits end and just want to cry! I believe it was a WP upgrade that caused this (I haven’t installed any plug-ins before upgrade). I was away from the site for a month and found this error when I came back.

    Unless you have any other suggestions, it sounds like my last resort is to pay someone to fix it. I’m happy that you were able to help many others work through this problem!

    • Hello Linda,

      Did you try importing the images using the media library and is it also returning the JSON response error? Also, did you try the classic editor switch and then clearing your site and browser cache? Let me know how this goes.

      • Hi Trishan,

        Thank you so much for your response.

        I called Bluehost and they helped me detect the error. As I mentioned, I only experienced the JSON response error when uploading images using the Block Editor. When I switched to Classic Editor, images are uploaded via the Media Library, where I got an error message saying the file size can be no more than 2500 px. wide.

        I adjusted the image size in SnagIt and boom, the problem was fixed! At least I have all these other workarounds in my back pocket should I encounter the JSON response error again when updating posts.

        I hope this helps other users who are experiencing the same problem when using the Block Editor. I’m going to go back to the other help forums I came across and offer this solution to users getting this response when uploading image files.

        You are a godsend to so many, and I hope you will continue with this forum.

        Many thanks again!


  12. Helo,

    I have diggerent issue regarding amp plugin…..few articles are not opening in amp mobile version…on desktop, it is opening… Can you provide the solution

  13. Can I hug and kiss you…
    It worked like a charm, also can I revert to old permalink structure?

  14. TLDR; Someone may have already suggested this. 🙂 I’m working on my local development and ran into this. I forgot to enable mod_rewrite. Post Name permalinks worked fine after that.

  15. Really thank you sir.
    Your blog solved my JSON problem.

    Then Your automatic Pop-up Window is not working properly so you send me that SEO E-Book.

Comments are closed.