Hi, there is a hosting provider that just does not allow auto_prepend_file directive. You can’t use it in .htaccess, you can’t modify php.ini, etc … just impossible request.
So the only way I can make Extended protection work is to load wordfence-waw.php file in wp-config.php file like this:
<?php
include_once __DIR__ . '/wordfence-waf.php';
// rest of wp-config.php file ... And the Extended protection works.
But this config is not expected by WordFence GUI, and it causes errors. For example, in a file wordfence/views/waf/waf-uninstall.php is this code:
if (WF_IS_WP_ENGINE || WF_IS_PRESSABLE || WF_IS_FLYWHEEL) {
$currentAutoPrependFile = wordfence::getWAFBootstrapPath();
} else {
$currentAutoPrependFile = ini_get('auto_prepend_file');
}With my “include_once” solution this code results in $currentAutoPrependFile variable being empty / null.
So … is there a way how to correctly manually load wordfence-waf.php without auto_prepend_file?
