How To Disable File And Folder View In WordPress

When you install WordPress in some web hosting companies, index files (index.php or index.html) are not included in the folders by default. Due to this problem; many folders in the main directory, where your website is installed, may appear openly to your visitors and search engines. This is a very serious problem, especially in terms […]

How To Disable File And Folder View In WordPress

When you install WordPress in some web hosting companies, index files (index.php or index.html) are not included in the folders by default. Due to this problem; many folders in the main directory, where your website is installed, may appear openly to your visitors and search engines.

This is a very serious problem, especially in terms of security and SEO, and you should fix it as quickly as possible. There are many ways to hide folders and files on WordPress sites, but today I will talk about the most effective and simplest method.

How to Hide Files and Folders?

When you add the code below to the end of your .htaccess file on your site, the folders and files on your WordPress site will be completely closed to visitors. This is the most effective and simple method. Let’s proceed by writing step by step what you need to do before proceeding with the code;

  1. Connect to your hosting package via FTP program. The simplest and most useful FTP extension is “FillaZilla”. If you are not familiar with how to access FTP, contact your hosting provider to avoid doing anything wrong.
  2. After connecting to your FTP, download the .htaccess file to your computer in the public_html folder (or wherever you installed WordPress), that is, in the directory where the wp-content / wp-admin folders are.
  3. Open the htaccess file with Notepad ++ or any text editor program and paste the following code at the bottom. Save and restore via ftp.
Options All -Indexes

If you’ve done everything so far, all files and folders on your WordPress site that are publicly visible will now be hidden. We hope this article helped you learn how to disable index display in WordPress to make your website more secure. For your questions and comments, you can leave a comment below or join us on Twitter.

Leave a Reply

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