Skip to main content

Jeremy's Variety Hour

WordPress error “The response is not a valid JSON response”

kennebel
Published on 2024-11-13

So, while installing WordPress on my server, ran across an error when trying to save page edits:

The response is not a valid JSON response

All of the articles and help docs I could find online were unable to help. The reason is because the articles all presumed that you are running Apache for the web server. However, I am running NGINX, which requires a slightly different solution.

From the following site: nixCraft, found two tweaks to your /etc/nginx/sites-available config file based on if WordPress is on the main domain/subdomain or if you have it installed in a subfolder.

Domain/Subdomain

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

Subfolder

location /blog/ {
try_files $uri $uri/ /blog/index.php?$args;
}

This REPLACES the portion you will find in other articles talking about .htaccess, as that is not in use with NGINX, but this change accomplishes the same thing.

So if you hit the error that sounds like it has nothing to do with the fix, that is IT life. 🙂

Leave a Reply

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