Skip to content

Commit

Permalink
Add wordfence-waf.php
Browse files Browse the repository at this point in the history
  • Loading branch information
edjeavons committed Jul 10, 2024
1 parent 908c5cf commit 0666cf8
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions includes/wordfence-waf.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* If using Wordfence you will find that their version of this file is deleted from ABSPATH
* during WordPress updates, which causes the website to crash.
*
* This version of the file should be loaded via `auto_prepend_file` (instead of Wordfence's
* version) by putting the following snippet into "/path/to/repo/web/.user.ini":
*
* ; Wordfence WAF
* auto_prepend_file = '/path/to/repo/vendor/eighteen73/nebula-tools/includes/wordfence-waf.php'
* ; END Wordfence WAF
*
* This file has no effect if Wordfence is not installed.
*
* @package NebulaTools
*/

if ( file_exists( dirname( __DIR__, 4 ) . '/web/app/plugins/wordfence/waf/bootstrap.php' ) ) {
define( 'WFWAF_LOG_PATH', dirname( __DIR__, 4 ) . '/web/app/wflogs/' );
include_once dirname( __DIR__, 4 ) . '/web/app/plugins/wordfence/waf/bootstrap.php';
}

0 comments on commit 0666cf8

Please sign in to comment.