• Resolved arnaudriviere

    (@arnaudriviere)


    Hello,
    I cannot optimize the Wordfence Firewall, I get this message.

    The changes have not yet taken effect. If you are using LiteSpeed or IIS as your web server or CGI/FastCGI interface, you may need to wait a few minutes for the changes to take effect since the configuration files are sometimes cached. You also may need to select a different server configuration in order to complete this step, but wait for a few minutes before trying. You can try refreshing this page.

    And I can’t do it manually since my cPanel doesn’t have a “PHP Variables Manager” option.

    I really don’t know anything about servers, PHP and all that so if anyone could help please! (and I know there are a lot of topics covering the same issue trust me I’ve read them all but still can’t find a solution to my problem).
    Thanks guys !

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

Viewing 9 replies - 16 through 24 (of 24 total)
  • Thread Starter arnaudriviere

    (@arnaudriviere)

    My host is O2Switch (it’s a French host)
    And no there’s no php.ini file in th same directory as the wordfence-waf.php. Should there be one ?

    And the wordfence-waf.php file contains exactly this

    <?php
    // Before removing this file, please verify the PHP ini setting <code>auto_prepend_file</code> does not point to this.
    
    if (file_exists(__DIR__.'/wp-content/plugins/wordfence/waf/bootstrap.php')) {
    	define("WFWAF_LOG_PATH", __DIR__.'/wp-content/wflogs/');
    	include_once __DIR__.'/wp-content/plugins/wordfence/waf/bootstrap.php';
    }
    • This reply was modified 3 years, 5 months ago by arnaudriviere.
    Plugin Support WFAdam

    (@wfadam)

    If this is set correctly then the auto_prepend should be working.

    I was able to find an older thread of a user who had the same issue with O2Switch:
    https://www.ads-software.com/support/topic/cant-activate-firewall-extended-protection-2/

    It looks like setting the PHP value in the cPanel resolved the issue. I am not sure what is missing with this install. The only thing I can suggest aside from having the host investigate further would be to do a reinstall.

    If you want to try a reinstall, you can backup your Wordfence settings via the Export option. Navigate to Wordfence > Tools > Import/Export Options and click Export. You can also take note of the current Whitelisted URLs you have in Wordfence > Firewall > All Firewall Options > Whitelisted URLs as these are NOT included in the Import/Export, and will be lost during the re-install.
    Here is what is exported: https://www.wordfence.com/help/tools/import-export/
    During the export, you will be given a long string of text. Keep this safe, you’ll need it in a few minutes.

    After that, enable the option to Delete Wordfence tables and data on deactivation in All Options > General Wordfence Options. You will want to remember to disable this after you reinstall Wordfence again.

    After you enable that option, you can deactivate Wordfence from the Plugins area of your site, then delete it. Next, from the plugins area, search for and re-install Wordfence like normal.

    It will be like setting Wordfence up for the first time. You will need to enter an email address, and then go into Tools > Import/Export Options and paste that string of text into the Import Wordfence Options field and click the button there.

    The firewall will be in Learning Mode by default for 7 days. I would recommend switching this to Enabled and Protected as soon as possible.

    Let’s see how this goes!

    Thanks again!

    Thread Starter arnaudriviere

    (@arnaudriviere)

    Thanks for the reply !
    I did everything you asked and sent you a report… Hope it finally works

    Plugin Support WFAdam

    (@wfadam)

    Sorry @arnaudriviere but it still looks like it’s not setting.

    It has to be something with the host configuration at this point. Something is preventing the auto_prepend_file from executing. Your host might be able to look at the access logs to see what is causing the issue.

    Let me know what you do find!

    Thanks again!

    Thread Starter arnaudriviere

    (@arnaudriviere)

    Hello again,

    My host asked me more info because the line appears on phpinfo so they’re not sure what isn’t working… So what seems to be the problem ?

    Plugin Support WFAdam

    (@wfadam)

    I think I might see the issue. The wordfence-waf.php file has the wrong paths. You will need to adjust the paths.

    Make sure the wordfence-waf.php contains this information but make sure to correct the paths:

    <?php
    // Before removing this file, please verify the PHP ini setting <code>auto_prepend_file</code> does not point to this.
    
    if (file_exists('/home/xx/public_html/wp-content/plugins/wordfence/waf/bootstrap.php')) {
    define("WFWAF_LOG_PATH", '/home/xx/public_html/wp-content/wflogs/');
    include_once '/home/xx/public_html/wp-content/plugins/wordfence/waf/bootstrap.php';
    }
    ?>
    Thread Starter arnaudriviere

    (@arnaudriviere)

    Hello,

    I tried fixing the paths but nothing changed, WAF still at 35%. And if I try to use the “Optimize the wordfence firewall” option it changes the paths back to the wrong ones…

    Thread Starter arnaudriviere

    (@arnaudriviere)

    Hello, it’s been a week and I still didn’t get a response… I tried what you suggested and it still didn’t work. Do you need me to send a diagnostic ?

    Plugin Support WFAdam

    (@wfadam)

    Can you email presales @ wordfence . com with subject “arnaudriviere for WFADAM”? This might require more specific information that I don’t want to share on the forum to protect your site’s privacy.

    Thanks again!

Viewing 9 replies - 16 through 24 (of 24 total)
  • The topic ‘Can’t Optimize Firewall’ is closed to new replies.