Prevent Information Disclosure

Having issue with "Prevent Information Disclosure" not recognizing the updated htaccess file fix. Can you assist?


  • James Morris

    Hello John

    Generally, if you're having issues with this security tweak, it's because your server uses NGINX as a reverse proxy for Apache. This is most common on Plesk Hosting accounts. If that is the case, you'll need to use the NGINX rules supplied in Defender and add them to "Apache & nginx Settings" in Plesk.

    If you are not running Plesk control panel for your hosting, then the issue is somewhere else. If that is the case, would you please grant me access to your site?

    You can learn how to grant WPMU DEV Support Access at the following link:

    Please reply back here once you've enabled access so I will be notified.

    Best regards,

    James Morris

  • Kris Tomczyk

    Hi John

    Thank you for support access.

    For Apache servers this could be a server permissions issue. Can you check the files permissions in the root htaccess file and see if they are okay (644 for files)?

    Moreover, you can add the htaccess rules manually into the .htaccess file in the root folder. Prevent Information Disclosure adds the following code to the .htaccess file:

    ## WP Defender - Prevent information disclosure ##
    <FilesMatch "\.(txt|md|exe|sh|bak|inc|pot|po|mo|log|sql)$">
    Order allow,deny
    Deny from all
    ## WP Defender - End ##

    As for Cloudways,it uses a bit different sort of server configuration than normal servers, it uses both Apache (for dynamic) and NGINX (for static). So adding the code into .conf file in 'nginx' configurations should solve the issue.

    You need to add some code in NGINX's .conf file. You can find the code here :

    The .conf file is usually located in a subdirectory under /etc/nginx/... or /usr/local/nginx/conf/... I'm not sure where the .conf file is for Cloudways, I'll suggest you to get in touch with their support system and ask them to help you out with this.

    Let me know what the results are. I'll be looking forward to hearing back from you. Thanks!

    Kind Regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.