Just a quick question that might help a tad bit with security. I noticed that the readme.html file has the version number listed. It reappears after each upgrade and so do the licence.txt, and wp-config-sample.php.
Is there a easy way to have WordPress auto remove these files after an upgrade?
I already block the version number from showing in the meta tags, rss feeds, atom, etc.
I know this type of security isn’t exactly that much helpful, but just thought it might be a tiny start. I heard that people can simply check the version of jQuery that is included in WP-includes and cross reference which version of WP shipped it.
You don’t really need to remove these files. It’s much easier to just block access to them. If you are using pretty URL’s you already have an .htaccess file. Using .htaccess to block the files is secure and you only have to add a directive once.
Blocking files is done by adding a directive to .htaccess like this:
So, to block readme.html you do this:
Do the same with the license file or any other file you want to prevent anyone from accessing. Just open .htaccess in Notepad or any other basic text editor, add the directives and save, making sure that the text editor keeps the file name exactly – without any .txt on the end.
Here is my take:
Personally, I would also block:
nb:
on
(it most likely is. it would be rare, to use wordpress without… (ugly permalinks, etc…)).# BEGIN WordPress
section in your .htaccessEdit : you can also try these