• Hi,

    Can’t make a post, all the time occurs the failure ‘Publishing failed. Error message: The response is not a valid JSON response’. I’m not a developer, so the detailed answer will be highly appreciated.

Viewing 15 replies - 16 through 30 (of 35 total)
  • “Just update your Permalink setting. Its work for me.”

    This worked for me.

    Thanks @taramandi

    “Just update your Permalink setting. Its work for me.”

    This worked for me too, thanks a lot @taramandi

    Nothing here has worked for me. WTF!

    Permalinks solutions didn’t work for me. I did find that if you are running a firewall on your hosting then adding this path to the whitelisted URLs fixes this – /wp-json/wp/v2

    I run Go Daddy’s firewall which is a Scurri solution I believe.

    Hope this helps.

    The whitelisted URLs fix worked for me thank you!
    @rubikazariah

    I am bradn new to wordpress, just spent two weeks learning it, and now can’t publish or save anything in my blog because this error comes up every time. please help

    Go to Settings->Permalink
    Choose Custom Structure and paste this
    “/index.php/%year%/%monthnum%/%day%/%postname%/”

    actually i just contacted my hosts and they said it’s a Gutenberg thing. They adjusted security setting in their interface somehow and it fixed the issue across all of my sites

    Tina Shaw

    (@christinashaw)

    You can simply fix this error by change permalink.

    Check this tutorial if unable to fix
    https://areawala.com/topten/publishing-failed/

    Same….resaving my existing permalinks seemed to have worked for me too. Thanks!

    I’m experiencing this error while I’m going back through old posts and fixing some formatting issues.

    One of the posts is how to Build a NAS and has many references to commands to issue on a commandline. What is causing the error for me is a reference to the file /etc/ssh/sshd_config

    Even if I put this in a code block, I get this error. The only way I found so far to fix this, is to modify the filename so it’s not valid.

    I was setting up a new installation of WordPress on a new server and I experienced the same JSON error. For me it was a typo in my try_files directive. This was on a server running Nginx.

    Corrected try_files:

    location / {
    	 try_files $uri $uri/ /index.php$is_args$args;
    }
    talucgiahoang

    (@talucgiahoang)

    Changing permalink and setting .htaccess doesn’t not work with me. The .htaccess file is overwritten each time changing permalink and presssing Save button.

    I can only create and post new page if I add index.php in the link

    Example: in Settings > Permalinks > Custom Structure
    https://mysite.com/index.php/%postname%/
    https://mysite.com/index.php/archives/%post_id%
    https://mysite.com/index.php/%year%/%monthnum%/%postname%/

    randeh

    (@randeh)

    @talucgiahoang

    If your WordPress installation is in a subdirectory. This might help https://www.ads-software.com/support/article/giving-wordpress-its-own-directory/

    • This reply was modified 4 years ago by randeh.
    • This reply was modified 4 years ago by randeh.
    • This reply was modified 4 years ago by randeh.
    • This reply was modified 4 years ago by randeh.
    v1997

    (@v1997)

    Here is the solution for NGINX only.
    Go to the /etc/nginx/sites-available/
    sudo nano default

    Now, here there are two server blocks, first one is running on port 80.
    for second server block there is a port 443 where you should implement the below code.

    server{
    #ssl configuration
    location / {
    # First attempt to serve request as file, then
    # as directory, then fall back to displaying a 404.
    # try_files $uri $uri/ =404; // comment this block
    try_files $uri $uri/ /index.php$is_args$args;
    }
    }
    Now exit and restart nginx server.

    ~$ sudo service nginx restart

    you are done. enjoy.

    scott8035

    (@scott8035)

    For me, the cause of this problem was that the request was being blocked by a firewall rule at Cloudflare, specifically, a rule in the “Cloudflare Specials” ruleset of their WAF (web application firewall). I temporarily turned that ruleset off while editing, then turned it back on when I was finished.

Viewing 15 replies - 16 through 30 (of 35 total)
  • The topic ‘Publishing failed. Error message: The response is not a valid JSON response’ is closed to new replies.