• Resolved pressablebradly

    (@pressablebradly)


    Hi there,

    I am with Pressable Customer Support. I wanted to propose a change in the way the plugin defines paths for the WAF.

    On line 7376 of wordfenceClass.php there is this function:

    public static function getWAFBootstrapPath() {
    return ABSPATH . ‘wordfence-waf.php’;
    }

    On Pressable, ABSPATH is the location of the core WordPress files. However, those core files are not the same location of the site root.

    I’d like to suggest a possible workaround, which will at least work on Pressable sites:

    public static function getWAFBootstrapPath() {
    if (is_writeable(ABSPATH)) {
    return ABSPATH . ‘wordfence-waf.php’;
    } else {
    return str_replace(‘/wp-content’,”,WP_CONTENT_DIR);
    }
    }

    With a function like this, the Wordfence WAF would enable without issue.

    Also, our Director of Support had previously requested a similar change a year ago: https://wordpress.org/support/topic/use-wp_content_dir-instead-of-abspath-for-wordfence-waf-php-creation/

    Thanks in advance for your consideration!

    Best,

    Bradly M. Hale
    Pressable Customer Support

Viewing 1 replies (of 1 total)
  • Hi Bradly,

    Thanks for reaching out to us through the support forums, we would appreciate if you can send us an email regarding your inquiry to “genbiz [at] wordfence [dot] com”, one of our team members will be in touch with you then.

    Have a great day!

Viewing 1 replies (of 1 total)

The topic ‘ABSPATH for Pressable Sites’ is closed to new replies.