Support » Plugin: Wordfence Security - Firewall & Malware Scan » wordfence-waf.php location

  • Resolved janw.oostendorp


    We are running wordpress in as a submodule in a directory (wp) so the structure is. It looks a lot like this skeleton setup:

    public_html/wp/ <= ABSPATH

    And wordfence places the public_html/wp/wordfence-waf.php
    It does so in \wordfence::getWAFBootstrapPath()

    All is fine, until we do a composer update/install/reinstall of the wp folder.
    Which deletes the wordfence-waf.php file. And the sites breaks!

    We should have the option to place the wordfence-waf.php file in the public_html/wordfence-waf.php

    All you would need to do to give developers this option is change one line:

    return ABSPATH . 'wordfence-waf.php';


    return apply_filters( 'wordfence_waf_path', ABSPATH . 'wordfence-waf.php');

    Of course there are other ways to fix this.
    I hope you understand my problem, and are willing to help fix this.

    Semi related topic:

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,
    Your suggestion has been forwarded to our developers, thank you! for now, you can move “wordfence-waf.php” file one directory upward, I mean, in “public_html” directory, and change its path in “.htaccess” or “.user.ini” file to the new path, you should find a code snippet like this in either of these files (depending on the server configuration):
    php_value auto_prepend_file '/var/www/html/wordfence-waf.php'


    Thread Starter janw.oostendorp


    Hello wfalaa,

    That will also work, and is a fine idea for now.

    I do hope you are willing to add this piece of flexibility.
    We deploy ~6 sites a month and this is a new setup.
    Now this means extra steps for something we could fix automatically with the filter.

    [ No bumping please. ]

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wordfence-waf.php location’ is closed to new replies.