PHP Classes

How to Use a WordPress Apache Configuration Plugin to Prevent WordPress Site Files be Listed by Apache Using the Package Disable Directory Browsing Htaccess Security for WordPress: Disable file lists of Apache that hosts WordPress

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2026-04-26 (1 hour ago) RSS 2.0 feedNot yet rated by the usersTotal: Not yet counted Not yet ranked
Version License PHP version Categories
disable-directory-br 1.0GNU General Publi...7Content management, Security, Configu..., B..., P...
Description 

Author

This package can disable file lists of Apache that hosts WordPress.

It provides a WordPress plugin that can address options to an ".htaccess" Apache configuration file to disable the listing of files in directories that may be under a WordPress site's document root.

The plugin can address the configuration directive Options All -Indexes to the .htaccess file that Apache reads to configure the access to the files of the WordPress site.

Picture of Adeleye Ayodeji
  Performance   Level  
Name: Adeleye Ayodeji <contact>
Classes: 36 packages by
Country: Nigeria Nigeria
Age: ???
All time rank: 268218 in Nigeria Nigeria
Week rank: 15 Up1 in Nigeria Nigeria Up
Innovation award
Innovation award
Nominee: 22x

Instructions

Documentation

=== Disable Directory Browsing Htaccess Security === Contributors: adeleyeayodeji Donate link: https://adeleyeayodeji.com/ Tags: security, htaccess, apache, directory browsing, hardening Requires at least: 5.0 Tested up to: 6.9 Requires PHP: 7.2 Stable tag: 0.1.1 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Disable directory browsing on Apache servers by adding `Options All -Indexes` to your site?s root `.htaccess` on plugin activation. == Description == Disable Directory Access is a lightweight security-hardening plugin that prevents visitors from viewing directory listings (for example, when an `index.php`/`index.html` file is missing). On activation, the plugin safely inserts the following rules into your site?s root `.htaccess` using WordPress markers: * `#Disable directory browsing | Disable Direct Access Plugin` * `Options All -Indexes` On deactivation, the plugin removes only its own marked block. Important notes: * This plugin targets Apache `.htaccess`. If your server does not use `.htaccess` (for example, some Nginx setups), these rules won?t apply. * The plugin requires write access to the root `.htaccess` file. == Installation == 1. Upload the `disable-directory-browsing-htaccess-security` folder to the `/wp-content/plugins/` directory. 2. Activate the plugin through the **Plugins** menu in WordPress. 3. Confirm your root `.htaccess` contains a block wrapped in `# BEGIN Disable Directory Access Plugin` / `# END Disable Directory Access Plugin`. == Frequently Asked Questions == = Does this work on Nginx? = No. Nginx does not use `.htaccess`. You?ll need to disable autoindex/directory listing in your Nginx site configuration. = Will this overwrite my existing .htaccess rules? = No. The plugin uses WordPress marker blocks and only adds/removes its own marked section. = What if my .htaccess is not writable? = The plugin won?t be able to write the rules. Ensure the web server user has permission to update the site root `.htaccess`. == Changelog == = 0.1.1 = * Update plugin URI and text domain to match new plugin slug. = 0.1.0 = * Initial release. == Upgrade Notice == = 0.1.0 = * Initial release.

  Files folder image Files (3)  
File Role Description
Files folder imageincludes (1 file)
Accessible without login Plain text file disable-directory-...access-security.php Aux. Auxiliary script
Accessible without login Plain text file readme.txt Doc. Documentation

  Files folder image Files (3)  /  includes  
File Role Description
  Plain text file class-ade-disable-direct-access.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads  
 100%
Total:0
This week:0