How to Disable Directory Browsing in WordPress

Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages



If your webserver does not find an index file it automatically displays an index page showing the contents of the directory. This makes your site vulnerable to hacks by showing the information needed to get into your theme or a plugin. In this video, we will show you how to disable directory browsing in WordPress.

If you liked this video, then please Like and consider subscribing to our channel for more WordPress videos.

Text version of this tutorial:
http://www.wpbeginner.com/wp-tutorials/disable-directory-browsing-wordpress/

Follow us on Twitter:

Checkout our website for more WordPress Tutorials
http://www.wpbeginner.com/

Summary of this Tutorial:

Start by connecting to your site using FTP.

You will need to edit your .htaccess file in the root directory of your site found in your root directory.

If you do not see the file you will need to tell your FTP client to show hidden files.

Download your .htaccess and open it in a text editor like notepad and add the following to the bottom:

“Options -Indexes”

Then save the file and reupload it to your server with your FTP client.

About the author: