Support » Plugin: Wordfence Security - Firewall & Malware Scan » siteground and wordfence configuration

  • Resolved imokweb


    I have an issue with setting up the plugin on the siteground web hosting.
    I wanted to set up the firewall and found a video where it says to add a php.ini file in the root directory and add this line to it auto_prepend_file = “/home/websiteroot/public_html/wordfence-waf.php”
    Which worked previously, but now it totally crashed the website.
    I got an error that the website is down, because of too many redirects.
    Once the file was removed, the website was back online.
    I talked to the customer support on siteground and we figured out that it has an issue with PHP 7.2.
    Once the website was reverted to PHP 7.0 it worked normally, with the php.ini in the root directory.

    Do you have any idea how can this be fixed, and also the website to work on PHP 7.2?
    I encountered this issue only on siteground websites.

    I asked them what could be the issue, and they said I should talk to the Wordfence support.

    This is not a unique case, I tried on several websites from the WHM account and they all did the same


    The page I need help with: [log in to see the link]

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


    Hi @imokweb

    We believe with PHP 7.2 that Siteground allows the use of a .user.ini file instead of a php.ini file to set the auto_prepend_file PHP directive.

    Create a .user.ini file in the same directory as the php.ini file. Cut and paste the Wordfence firewall code into the .user.ini file, backup and delete the php.ini file.

    Let me know if that fixes it.

Viewing 1 replies (of 1 total)
  • The topic ‘siteground and wordfence configuration’ is closed to new replies.