How to Fix “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.

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.

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.

blank

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.

Classic Editor plugin settings for WordPress
Classic Editor plugin settings

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.

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.

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 4 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.

  • 1
    Share
blank
About Trishan Mehta

Trishan loves to dig into all things WordPress and SEO. When not blogging, he loves exploring the mountains to get a dose of fresh air and new insights on life. Recently, he has published an ebook with actionable tips on WordPress SEO. You can grab the ebook here.

65 thoughts on “How to Fix “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.

    x<?php

    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.
    https://www.wpbizblog.com/response-is-not-a-valid-json-response-error/

    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.
    Cheryl

    • 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!

        Linda

  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.

WordPress SEO Made Easy!

Go from WordPress SEO zero to hero in no time. Optimize your blog's SEO, gain higher rankings, and attract more search traffic to your blog.

 

WordPress SEO eBook
No thanks, I know everything about WordPress SEO