• Resolved Selah

    (@tubescreamer)


    Hello,

    I am having an issue where I don’t see any changes made by Wordfence in my .htaccess file. For example, I enabled the “disable execution of PHP in uploads directory” option and that was supposed to add code in the .htaccess file but that code isn’t there. As a matter of fact, I don’t see anything with regards to Wordfence in my .htaccess file. I had to create a new .htaccess and resave permalinks, though. Is there anything else I have to do so that Wordfence can make changes to this new .htaccess file?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support WFAdam

    (@wfadam)

    Hello @tubescreamer and thanks for reaching out to us!

    Can you send a diagnostic report to wftest @ wordfence . com? You can find the link to do so at the top of the Wordfence Tools > Diagnostics page. Then click on “Send Report by Email”. Please add your forum username where indicated and respond here after you have sent it.

    I should be able to see what might be happening.

    Thanks!

    Thread Starter Selah

    (@tubescreamer)

    Hi @wfadam,

    I sent the email. Looking forward to your reply!

    Thanks.

    Plugin Support WFAdam

    (@wfadam)

    I was unable to locate your report. Could you try to send it again?

    Thanks!

    alkemi

    (@alkemi)

    I’d like an answer to this, also, maybe posted here so others can benefit? I had to create a new htaccess file, and I can’t find a way to get wordfence to re-do the setup & additions that need to be in that file.

    Plugin Support WFAdam

    (@wfadam)

    @alkemi each set up is a little different. It would depend on Server API for PHP for what is to be set in the htaccess file.

    As per forum guidelines below, could you please open your own topic and we would be glad to assist you:

    “Unless users have the exact same version of WordPress on the same physical server hosted by the same hosts with the same plugins, theme, and configurations, then the odds are the solution for one user will not be the same for another. For this reason, we recommend people start their own topics.”

    Thread Starter Selah

    (@tubescreamer)

    @wfadam

    Sent the report again. Under the username field I put “tubescreamer”

    Plugin Support WFAdam

    (@wfadam)

    Thanks for sending that @tubescreamer I got it this time.

    Looks like you’re using Apache + CGI/FastCGI so you would want the following in your htaccess file:

    # Wordfence WAF
    <Files ".user.ini">
    <IfModule mod_authz_core.c>
        Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
        Order deny,allow
        Deny from all
    </IfModule>
    </Files>
    # END Wordfence WAF

    You will also want this in your user.ini file but the path to the wordfence-waf.php will need to be adjusted:

    ; Wordfence WAF
    auto_prepend_file = '/path/to/waf/wordfence-waf.php'
    ; END Wordfence WAF

    Though it does look like your firewall is optimized according to your diagnostic.

    Let me know what you find!

    Thanks!

    Thread Starter Selah

    (@tubescreamer)

    Hi @wfadam,

    I pasted what you sent into my .htaccess file and when I checked my .user.ini file, what you sent was already there and the path to the wordfence-waf.php was correct. That should be it? If I make a change in the Wordfence plugin, it should reflect in the .htaccess file now, right?

    Was there anywhere in particular that I was supposed to paste the above in my .htaccess file? I put it right after the #END WordPress section

    • This reply was modified 4 years ago by Selah.
    Plugin Support WFAdam

    (@wfadam)

    Perfect! Yes, that’s a good place for it, right after #END WordPress.

    This should optimize your firewall! Send me another diagnostic the same way you did previously, so I can verify that its working now.

    Thanks!

    Thread Starter Selah

    (@tubescreamer)

    Sent.

    Plugin Support WFAdam

    (@wfadam)

    Thanks for sending that over @tubescreamer

    Looks like it worked! Your firewall is now optimized. It looks like your htaccess file is working correctly now.

    Let me know what you find!

    Thanks!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Wordfence not making changes to .htaccess’ is closed to new replies.