• Resolved jpomerantz

    (@jpomerantz)


    Hi,

    I am having a problem installing Wordfence on my WordPress site. This is similar to another post but the fix in that did not help.

    Basic installation of the Wordfence free plugin goes smoothly – except for a notification at the top of the screen that indicates the firewall still needs to be configured to benefit from extended versus basic firewall protection. But selecting the preselected configuration (Apache + SuPHP) did nothing – even after long waits and refreshing the page.

    I contacted SiteGround support and was told I need to select Apache + CGI/FastCGI. Which I did — but that didn’t work either.

    I followed the instructions for Web Application Firewall Setup and the section specifically concerning SiteGround. In cPanel, I added the variable auto_prepend_file = mypath to my subdirectory where my WordPress installation is and saved to all subdirectories. Then I went back to the WordPress Dashboard and the Wordfence firewall configuration page and selected Apache + CGI/FastCGI — but after waiting over an hour, still nothing has changed. My firewall protection still says “Basic” versus “Extended.”

    I contacted Siteground and they checked – saw the htaccess changes had been made and it should have been working recursively. They had to manually add the preappend line as even my doing it manually did not take. They also cleared their server cache.

    Despite this, after waiting hours it still shows Basic and has the message: “To make your site as secure as possible, take a moment to optimize the Wordfence Web Application Firewall:” on top of the page.

    Could you please tell me what I’m doing wrong? Wordfence is such an excellent product, I really want it working. Thanks

    Jay

    • This topic was modified 7 years, 3 months ago by jpomerantz.

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

Viewing 13 replies - 1 through 13 (of 13 total)
  • Hi @jpomerantz,

    On the Wordfence System Info page, what values do you see for:

    • Server API
    • Loaded Configuration File

    In order to display that page:

    • Go to the Wordfence Tools page
    • Click the Diagnostics tab
    • In the Other Tests section (near the bottom of the page), click the link that reads “Click to view your system’s configuration in a new window“
    Thread Starter jpomerantz

    (@jpomerantz)

    Hi @wyfann,

    1. Server API: CGI/FastCGI (this is what Siteground told me they use)
    2. Loaded configuration file: /home/bluew212/public_html/php.ini

    Jay

    Sorry @jpomerantz,

    I forgot to include “auto_prepend_file”.

    What values (Local and Master) do you see for that parameter on the Wordfence System Info page?

    Thread Starter jpomerantz

    (@jpomerantz)

    Oops.

    Anyway:

    auto_prepend_file = ‘/home/bluew212/public_html/wordfence-waf.php’

    For both

    Thread Starter jpomerantz

    (@jpomerantz)

    Hi @wyfann,

    Thoughts? Thanks

    Jay

    Hi @jpomerantz,

    If you have ssh access to the host, could you please try and run the following command, first from the root folder, and then from the wp-admin folder:

    php -i |grep auto_prepend_file

    Does it show the same value for “auto_prepend_file” in both cases?

    Thread Starter jpomerantz

    (@jpomerantz)

    I do not but I had called the host and they actually put the line in. And yes it shows for both cases and for some trying the auto_append_file as well.

    SOLUTION FOR FIREWALL NOT WORKING ON SITEGROUND

    1) Create a php.ini file in your installation root folder and add the following line:
    auto_prepend_file = '/home/youruser/public_html/yourdomain.com/wordfence-waf.php'

    2) Then to make sure this rule is applied recursively, you must add also this line to your root .htaccess file:
    SetEnv PHPRC /home/youruser/public_html/yourdomain.com/php.ini

    Thats it.

    Thread Starter jpomerantz

    (@jpomerantz)

    @walpap – as noted in the initial post all this has been done and still not working.

    @wyfann – do you want the whole info file?

    Hi @jpomerantz,

    According to the feedback you provided the “auto_prepend_file” directive appears to be set and to apply to sub-directories.

    At this stage the only explanation I can think of is that your hosting provider somehow disabled the use of “auto_prepend_file”.

    Could you please check with them?

    Thread Starter jpomerantz

    (@jpomerantz)

    Hi @wyfann

    sorry for the delay in my response. I will ck with them today.

    Jay

    Thread Starter jpomerantz

    (@jpomerantz)

    @wyfann

    all is set now. They had to manually add the line, set it for all subfolders (even tho they said it previously was :-()

    jay

    Hi @jpomerantz,

    Thanks for letting me know. I’m glad the problem is now solved!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Siteground-firewall config issues’ is closed to new replies.