Secure WordPress by Preventing Directory Listing

Secure WordPress by Preventing Directory Listing

For security reasons it’s important to make sure that people cannot navigate your /plugins/ directory. Depending on how your server is set up, your directories may be listed for all to see when visiting those URL’s. You can check on your site by visiting your plugins folder:

http://yoursite.com/wp-content/plugins/

Quick Fix:

Add a blank index.html file to this directory to secure it so that visitors see a blank page when they go there. Adding a blank index.html file to all of your folders can be time-consuming, so if you’re comfortable editing your .htaccess file, go ahead and add this one line:

{code type=html}
# Prevents directory listing
Options -Indexes
{/code}

This will secure your folders sitewide.