• Resolved Tarsis.net

    (@tarsisnet)


    Hello,

    I’ve been using Wordfence for a while and I am very happy with their features, but recently I came to a situation in which I need to add a different auto_prepend_file to the .user.ini file of one of my instances (FastCGI).

    In fact you can add more than one auto_prepend_file clauses to .user.ini, but only the last one will be executed by Apache, so, if I prepend my new script, I will loose Wordfence, or the other way around.

    One possibility is to create a wrap PHP script which will execute (include) both Wordfence WAF script plus my own script, and make this the one referenced in .user.ini, but I am sure that this would upset Wordfence and it may think it is not properly installed, even if the WAF script it’s been ran.

    Besides, I don’t know what may happen during a plugin upgrade.

    Do you know some other technique (FastCGI) which would allow to have the best of both worlds?

    Thank you for your help.

Viewing 1 replies (of 1 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @tarsisnet, thanks for reaching out about this and I’m glad to hear you’re enjoying Wordfence.

    Take a precautionary backup of your site in its current state before you make any changes, but our firewall optimization wizard can likely help you here. If you manually change auto_prepend_file to the non-Wordfence script and save the .user.ini, the firewall will start reporting as “Basic Protection” and once again suggest that you optimize the firewall.

    When you’d require two auto_prepend_file values after Wordfence optimization, the INCLUDE option in our wizard will make sure that our wordfence-waf.php also includes your script so that they both load.

    I hope this helps you out!
    Peter.

Viewing 1 replies (of 1 total)
  • The topic ‘auto_prepend_file to Wordfence firewall script’ is closed to new replies.