How to Disable Directory Browsing in WordPress

Hello and welcome to Today,
you’ll learn how to disable directory browsing in WordPress. This is an example of looking at a website
directory. This comes up on a website if there isn’t an index page like index.html or index.php to show in that directory. Hackers use this to find files that might
have a vulnerability that they can exploit so disabling access to it is important in
keeping your site safe. To do this you’ll need to access
the root directory of your website. I’ll use Filezilla to locate the .htaccess
at my root folder. I’ll copy it locally so I can edit it. Now, at the end of all my WordPress generated
code I’ll add this: Options -Indexes all that does is tells means don’t show the index of
my website. and that’s all you need to do. I hope you liked this video and found it helpful. If you did, click on the like button below
and leave us a comment. And if you want to receive more helpful videos
don’t forget to subscribe to our channel and check out WPBeginner for more useful information
on WordPress.

9 thoughts on “How to Disable Directory Browsing in WordPress

  1. Hello, got this problem "only on mobiles" :
    Would this solve my problem? Sadly it's very important for me to show my meta tag… for indexing on computers
    My web site is
    If you know how to, would be great as I'm afraid in loosing indexing. 🙁

  2. If i'm selling a digital product, which folder do you recommend uploading it to? and should it be indexed? Thanks.

  3. Hola buenos días: Attention!!!!!!!!!!
    I did what it says in the video but it gave me an error 500 the whole web disappears, I had to delete that code. This indicates that the cure is worse than the disease

  4. Hello,
    Thank you so much for all your helpful videos! 
    I am about to enhance the security of my website, and I have read a lot of useful articles in your website even the old once, and I am so thankful about it!
    But I have few question about it, first, the progress of Disable File Editing and Disable PHP File Execution in Certain WordPress Directories by adding codes in .htaccess file won’t prevents WordPress from upgrading WordPress core files, the plugins and the theme files? So the automatic security updates for WordPress core and the plugins will be disabled?
    ALSO, what you think about moving the wp-config.php outside the web root which so many disagree it and many others say it enhance the security. Or do you suggests me only to secure my WordPress Configuration File by adding a code to the .htaccess file to limit access to this file? 
    Thanks again!

Leave a Reply

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