Hide WordPress
Remove the WordPress readme file and close the debug log, so scanners and visitors cannot read them.
WordPress ships a file called readme.html in the site root. It is not part of your pages, and nobody needs it on a live site. It tells scanners which WordPress version you run. WordPress also keeps a debug log when logging is on. On many hosts that file sits in wp-content where anyone can download it.
This add-on removes readme.html, deletes debug.log when it can, and adds a small rule that denies HTTP access to the log on Apache and LiteSpeed. On nginx the rule file is ignored, so the add-on says so and gives you the server rule to paste.
Static files are served by the web server, not by WordPress. That is why the add-on works with files and server rules, and does not promise a block that PHP cannot enforce.
The two protections
readme.html
WordPress puts readme.html back after every core update. The add-on removes it when you activate the add-on, and again after each core update. You do not have to remember it.
The file is not restored when you deactivate the add-on. WordPress brings it back with the next update. That is normal: the file is not yours, so there is nothing to restore.
If the file cannot be deleted, the add-on does not stop your site. It shows a warning in the admin area and marks the item as failed in the panel.
debug.log
The file is deleted when it exists and can be written. The add-on then adds a managed block to wp-content/.htaccess:
<Files "debug.log">
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order allow,deny
Deny from all
</IfModule>
</Files>The block is placed between two markers. The add-on only adds, replaces, or removes that range. Your other .htaccess rules stay as they are.
On nginx .htaccess is not read. The panel reports a warning and shows the rule to add to your server block. It does not claim the log is closed when it is not.
Where the log lives:
- If
WP_DEBUG_LOGholds a path, the add-on uses it. - Otherwise the log is
wp-content/debug.log. The same path is used whenWP_DEBUG_LOGistrueor not set.
File diagnostics
The panel checks the live state every time you open it:
readme.html: present or absent, writable or read-only.debug.log: path, present or absent, writable or read-only, and whether the managed.htaccessblock is applied.- The detected web server: Apache, LiteSpeed, nginx, or unknown.
The status dot has three meanings:
- OK: nothing to do, or the protection is in place.
- Warning: the add-on cannot guarantee the result. On nginx this is expected, and the snippet is the fix.
- Fail: a file exists but cannot be removed, or the
.htaccessblock cannot be written. Check file permissions.
Settings
All settings are in the group Files and Logs. Both are on by default.
Files and Logs
Remove readme.html
Default: on
Deletes readme.html after activation and after every core update.
Turn it off if you use the file for something of your own. WordPress does not need it on a live site.
Close debug.log
Default: on
Deletes debug.log when it can, and adds the managed .htaccess block that denies access to it.
Turn it off only if another tool owns wp-content/.htaccess and you do not want the block there. The add-on removes its block when you turn this off or delete the add-on.
When a status is not OK
readme.htmlis read-only. Your host or file permissions do not let PHP delete it. Ask your host, or remove the file with their file manager. The add-on tries again after the next core update.debug.logis read-only. The block may still work on Apache and LiteSpeed. If the status is Fail, check thatwp-content/.htaccessexists and can be written.- The server is nginx. Add the snippet from the panel to the nginx
serverblock that serves the site, then reload nginx. The add-on keeps reporting Warning because it cannot verify a file it does not manage. - The server type is unknown. The add-on cannot tell whether
.htaccessis used. Open the site's log URL in a private window. If it downloads, add a server rule.
It does not patch WordPress
The add-on does not edit core files. It deletes one file, deletes one log, and manages one block in wp-content/.htaccess. Everything else stays untouched. When you delete the add-on, it removes its option and its .htaccess block. Deleted files stay deleted; WordPress brings readme.html back with the next update.
This add-on does not touch XML-RPC, REST users, oEmbed, ?author= pages, .env files, or database dumps. Other BotBlocker add-ons cover those surfaces.