Forum
My site was infected with a malware, after restore a backup and run a scan using Wordfence, it mentions:
/wp-content/debug.log is publicly accessible and may expose source code or sensitive information about your site
Can you please help me to make wp-content/debug.log inaccessible?
My site was infected with a malware, after restore a backup and run a scan using Wordfence, it mentions:
/wp-content/debug.log is publicly accessible and may expose source code or sensitive information about your site
Can you please help me to make wp-content/debug.log inaccessible?
Please try creating a .htaccess file in the “wp-content” directory (if it is not there already) and add the following rules into it:
<Files "debug.log">
Order Allow,Deny
Deny from all
</Files>
Hope this helps. Let me know if it works for you. Thanks!
Kind regards,
Ankit