• Resolved nycbrook

    (@nycbrook)


    Hello,

    I have been a user of Wordfence for several years on multiple websites.
    This morning I awoke to a notice on an uptime detector that I use that my website went down earlier in the morning, and indeed upon looking, my website was showing a 500 error.
    After much frustration and diagnosing (I am indeed an amateur), I came across an article noting potential issues with Wordfence adding code to the user.ini file that can cause this issue. Sure enough, upon deleting this code (website and directory redacted with “sample”):
    ; Wordfence WAF
    [PHP]
    auto_prepend_file = ‘/home2/sample/sample.com/wordfence-waf.php’
    ; END Wordfence WAF
    the websites started working again.
    My two key questions now are why did this suddenly start causing an issue when nothing was changed that I am aware of concerning updates and also, what are the consequences, if any, of deleting this code while still utilizing Wordfence?
    I appreciate any assistance/clarity on this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @nycbrook, thanks for getting in touch!

    Removing this code will change your Wordfence firewall optimization from “Optimized” to just Basic protection. You’ll be able to see whether this is the case on your Wordfence > Firewall page. However, on some hosts that don’t support .user.ini, this code is placed in .htaccess instead.

    If this code was indeed the cause for 500 errors on your site but everything was working properly before, there’s a chance your hosting provider has changed something that would require the code to be placed elsewhere – but that’s speculation based on the issue being an unusual occurrence that happened without warning. It might be worth checking in with them.

    If your host hasn’t changed anything, and your firewall is no longer optimized, try our optimization wizard again to see if reinstating the code seems to cause issues again and let me know how you get on.

    You can read more about firewall optimization here: https://www.wordfence.com/help/firewall/optimizing-the-firewall/

    Thanks,

    Peter.

    Thread Starter nycbrook

    (@nycbrook)

    OK.
    I appreciate the clarity.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sudden Issue With Wordfence Code In user.ini Causing 500 Error’ is closed to new replies.