July 07th, 2024

How to disable directory browsing in WordPress

Like (0) Comments (1)

1 Comments Add Your Comment

Akshat Gupta
3 years ago Selected
Disabling it is not a difficult task. All you need to do is add one line of code to your .htaccess file. This .htaccess file is found in the root folder of your site.

To edit it, first login to your hosting's cPanel. After that go to the root directory. Here you will see your .htaccess file.

Apart from this, you can edit the .htaccess file by connecting your site to FTP.

You have to paste the below code in your .htaccess file.

Options -Indexes
Click on the Save changes button to store the changes made in the .htaccess file.

Congratulations! You have disabled Directory Browsing on your site.
Like (0) Reply

Post a Comment

To leave a comment, please Login or Register