Archives for February 8, 2018

Directory Indexing in WordPress

Just plunk this line in there!

Indexing is an option that allows the contents of a directory to be displayed in the browser when the directory does not contain an index page.

WordPress and many of its security plugins disable this to prevent access to core wordpress files stored in the root directory of your wordpress site.

Sometimes though you need to allow access to a directory (if only for a short while) and to do that you need to go around WordPress – To do that you just plunk the link below into your .htaccess file and you are good to go.

Note: It is recommended (not just by me but the whole wordpress community) that you remove or disable this option when it is not needed.

To DISABLE Directory Browsing or Indexing

Type or copy and past the following line of text in to your blank file.
Note: I add the work “All” so that every folder in that directory follows the same rule.

Options All -Indexes

To ENABLE Directory Browsing or Indexing

You can reactivate it by adding the following line to your .htaccess file:

Options +Indexes

Once this is added, the directory will fully index again.