• Hello,
    I am with the French host O2Switch who uses a Cpanel.

    When I follow the instructions to optimize the firewall, it is concerned that I have to modify “configure manually” to change the PHP variables of the “auto_prepend_file”

    This manipulation is OK on the CPanel but crashes my site… nothing works anymore as soon as I enter the access path.

    I deleted it for now so the site is back online.
    How to resolve the problem?

    Thanks in advance

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

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

    (@wfpeter)

    Hi @cpgraphisme, thanks for reaching out.

    If your site crashing is a HTTP Error 500, then it’s likely the relative path to wordfence-waf.php in .htaccess or .user.ini (depending on your environment) is incorrect. It should look like this:

    ; Wordfence WAF
    auto_prepend_file = '/your/path/to/wordfence-waf.php'
    ; END Wordfence WAF

    wordfence-waf.php should be in your site’s root folder, and you can discover the path you should use by visiting Wordfence >Tools > Diagnostics > WordPress Settings > ABSPATH.

    A typical wordfence-waf.php looks like this, so you can always create the file yourself and populate it with this information if needed:

    <?php
    // Before removing this file, please verify the PHP ini setting <code>auto_prepend_file</code> does not point to this.
    if( ! defined('WFWAF_STORAGE_ENGINE')) { define('WFWAF_STORAGE_ENGINE', 'mysqli'); }
    
    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';
    }

    Let me know how you get on!
    Peter.

    Thread Starter cpgraphisme

    (@cpgraphisme)

    Hello,

    Thanks for your answer.

    I checked and I have an HTACCESS file and a USER.INI
    Both point to the correct path… but I still get a 500 error.

    Screenshot : https://prnt.sc/nAs_7hVtr0zx

    How to do in this case?

    Best regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Firewall Extended Protection crashed my site’ is closed to new replies.