Support » Localhost Installs » ERROR Updating failed. Error message: The response is not a valid JSON response.

  • Resolved meriellloyd


    When trying to update a post or page on local dev site i keep getting this error “Updating failed. Error message: The response is not a valid JSON response.”

    Doesn’t happen on live site.

    I have run Health Check & Troubleshooting mode but still get the error so it’s not a theme or plugin issue.

    I DON’T get the error when running the Classic Editor plugin. I prefer the new block editor so would like to fix this issue than rather just avoid it.

    Any help/tips would be greatly appreciated.

    Many thanks,

    • This topic was modified 1 year, 6 months ago by James Huff. Reason: moved to Locahost Installs forum
Viewing 15 replies - 16 through 30 (of 78 total)
  • Hi Guys,

    I’m facing same issue. My website also go thru cloudflare. @scottofford you said installed cloudflare plugin will resolved the problem. Which plugin need i choose? there is a few cloudflare plugin here..

    Thread Starter meriellloyd


    Hi @kyrullanuar

    So I’m running my dev site locally and the only way to fix it was this. Settings > Permalinks > set to custom structure and then add this /index.php/%year%/%monthnum%/%day%/%postname%/

    Somehow this seemed to fix it. Unfortunately, I can’t find the website where I found that solution.

    @kyrullanuar if your website’s dns is hosted through cloudflare, you can find their official WP plugin:

    One other thing I did (and I’m not sure if this had any effect) was that I turned off permalinks in the WP settings, saved it, and then turned permalinks back on.

    @scottofford @meriellloyd

    I will try play with permalink first and let know the result.

    I found that Cloudflare plugin required to login. Unfortunately i am using shared DNS hosting manage by hosting provider. Of course they will not give me the permission.

    Updating the permalinks worked for me in my localhost.

    I am also new to wordpress. I had the same issue while adding or updating new page in localhost. I tried below step and get ride of it.
    1. Go to Settings->Permalink settings
    2. select option as post name.
    3. Save changes
    It resolves my error.

    Same error. I have no plugins installed.
    “Updating failed. Error message: The response is not a valid JSON response.”

    I get rid of error only if I set Permalinks to PLAIN.
    But permalinks to plain are not a good option for SEO.

    Many people have reported this error. I hope the support team will fix this error ASAP!!!

    • This reply was modified 1 year, 5 months ago by alphabyte.

    I attempted the permalinks setting changes and am still getting the error when updating one specific post (which seems to mysteriously have lost several key items- the seo terms and snippets for example). I did several posts with no issue just before and after this one particular one, so I am completely baffled as to what is different for this one post. This is very frustrating and I have no idea how to fix it.

    • This reply was modified 1 year, 4 months ago by scottiev.

    This is a permalinks error.

    Take these steps to fix it (explained here: )

    1. go to settings > permalinks and save permalinks again
    2. if you’re on nginx, make sure that wordpress nginx rules are added
    3. if not added, then add them and restart nginx

    Make sure you have SSL certificate installed and enabled, that is how I solved it

    Gulshan Kumar


    Disabling WAF for ** path fixed the issues instantly. Previously it was failing due to 403 response coming due to CF.
    I hope this help someone here.

    Was troubled with this error. It was also a nuisance having the index.php in the middle of the url. I tried all the published fixes without success, including the Cloudflare plugin. In the end, the fix was in the apache2.conf – changed AllowOveride to All for / and /var/www and restarted Apache. Then set permalinks to /%postname%/ and it all worked.

    Recent experience, may help others.
    I recently created a new WP installation on my testing server (on my local network).
    Once I am sufficienty happy, I will transfer this to my production server, not on local network.
    I was about to start working on the site, but the 5.4 update was ready; so let that go through.
    Everything looked OK to login, but when I went to edit & update items, I was getting the JSON error. Sure enough as suggested, changing to the Classic Editor seemed to fix this (a little disappointed).
    Continuing on, I then noticed my Permalinks weren’t working(OK on Plain). Read up on .htaccess, mod_rewrite, Apache2 configs. I thought that for sure I had looked at all this in previous projects.
    >>In the end it turned out to be incorrectly set site URLs.<<
    As this was a testing server, I had accessed the site through the local IP address xx.xx.xx.xx/votw
    During the intial install / setup WP had also put this into the site URLs.
    To fix the issue, I created a record in my local hosts file using the final domain name, but minus the www. part. This allows me to access the testing server using the correct URL (no www), or the production server by including the www. This will not effect anyone else away from the machine I use, they will simply go to the production server as per DNS.
    >>This allowed me to put the correct URL into my local test WP site.<<
    Now everthing seems to work fine; no JSON error, I can go back to using the block editor, and my Permalinks work on any setting.

    Hello everyone! I have been having this problem for months with my site and with the sites of several clients, but I can publish (despite the error), I mean it was tedious but it didn’t make anything impossible for me. Until today, that I decided to find a solution to this problem that is already annoying and I found all these answers.

    I tried many of the solutions proposed here and none have worked for me. Certainly activating “No Gutenberg” plugin is not entirely a solution to the problem, because the block editor has many advantages compared to the classic WordPress editor.

    Anyway, after a lot of testing, I found a solution disabling all the plugins and seeing if any of thems were causing problems. The problem in my case was Hummingbird. So, to draw some conclusions I installed other plugins of this style and with some of them the error began to appear again, which leads me to think that perhaps the error is associated with this type of plugins.

    To finish, the plugin that I could let fulfill the cache optimization function and not generate the JSON error was Autoptimize.

    I hope all this info is helpful for anyone!

Viewing 15 replies - 16 through 30 (of 78 total)
  • You must be logged in to reply to this topic.