HomeTutorialsWordPressHow To Disable Directory Browsing In WordPress.

How To Disable Directory Browsing In WordPress.

You finding out how to disable directory browsing in WordPress is not a bad idea because it is one of the key things you need to do right after you have installed WordPress on your website Cpanel before you even run your website.

Disabling directory browsing in WordPress is what you need to think twice before you do it because it best way of keeping your WordPress website files save and secure.

How To Disable Directory Browsing in WordPress using cPanel.

The best way to disable directory browsing in WordPress using cPanel is logging in to your website cPanel and have some code added on a particular file that will disable directory browsing.

You are to use this code below to disable WordPress Directory Browsing.

Options All -Indexes

Step 1: Opening Your File Manager

Disable Directory Browsing in WordPress using cPanel

The first step is for you to log in to your web hosting account cPanel and locate your File section and click on the File Manager.

After clicking on the file manager you will be taken to another screen we=here you will see all your files and folders.

Step 2: Editing the .htaccess file.

You will see .htaccess file then click on the .htaccess file to open the file.

After opening the .htaccess file you see a line of codes just like the codes below,

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Now add this code just at the end of the above code,

Options All -Indexes

The final look of the code is the example below,

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Options All -Indexes

Then save your changes and you have successfully disabled directory browsing on your WordPress website.

Now and refresh your website and add /wp-includes/ at the last line of your URI and you will see that it’s now a 404 page.

So the above tutorial has just guided you on how to disable directory browsing in WordPress with Cpanel.

ALSO READ: 7 Amazing Best WordPress Live Chat Plugins

Please share, follow and like us:
error0
fb-share-icon20
Tweet 20
fb-share-icon20
Valentine Kaluhttps://veecyber.com
Football Lover, Manchester United Fan, Web developer, Blogger, Digital Marketer, and a professional PHP, JavaScripts, HTML & CSS Coder. With WordPress Development/Designing Experience. Acting at the sweet spot between aesthetics and intellectual purity to express ideas through design & development. Concept is the foundation of everything else.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments

Please share, follow and like us:
error0
fb-share-icon20
Tweet 20
fb-share-icon20
Translate »
0
    0
    Your Cart
    Your cart is emptyReturn to Shop