Fix Publishing failed. The response is not a valid JSON response.

For future reference.

The wordpress editor gives the error:
Publishing failed. The response is not a valid JSON response.

Now most answers refer to Apache’s .htaccess file. But in Nginx the fix is to add the following in your nginx site config:

 location / {
        #       # First attempt to serve request as file, then
        #       # as directory, then fall back to displaying a 404.
        #       try_files $uri $uri/ =404;
        try_files $uri $uri/ /index.php?$args;
        }

Similar Posts

Leave a Reply

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