nginx and WordPress 403 forbidden error

I’ve been using nginx for our server and tried installing WordPress on it. Everything worked as expected and all of a sudden I started to see this error 403.

After searching a while figured out that I need to enable auto listing for nginx.

location /wordpress {
        autoindex on;
        autoindex_exact_size off;
        autoindex_localtime on;

Did it and worked like magic. Also make sure index.php is listed below your root path.

Did you enjoy this article?
Signup today and receive free updates straight in your inbox. We will never share or sell your email address.


  1. In which file did you put the code to enable auto listing?

    • It’s the usual config file.


Leave a Reply