Daily Archives: March 27, 2015

home » 2015 » March » 27

Protect wordPress special files from direct access

Block access to backup and source files. The below script in .htaccess tells the server to look for files with any of this extensions: [filename].config, [filename].sql, [filename].bak and so on, and if so, deny processing requests for such files.It will return a 403 Forbidden error instead.

For extra security we should block access to the WordPress readme.html file and other default WordPress files which publicly display your current WordPress version number. Rather than deleting these files, it’s better to add the following directive to our .htaccess file to block public access to these files.