When you go through the steps to activate the Wordfence firewall, Wordfence creates a php.ini file (similar to user.ini but for Wordfence on your new host).
That file contains a path to the wordfence-waf.php file.
And your .htaccess file should have been updated with a line at the top that gives the path to the php.ini file.
For example:
.htaccess line added to top:
SetEnv PHPRC /home/username/public_html/php.ini
The php.ini files contains
auto_prepend_file = '/home/username/public_html/wordfence-waf.php'
zend_extension=/usr/local/php72/lib/php/extensions/ioncube.so
zend_extension=/usr/local/php72/lib/php/extensions/ZendOptimizer.so
The wordfence-waf.php file contains
<?php
if (file_exists('/home/username/public_html/wp-content/plugins/wordfence/waf/bootstrap.php')) {
define("WFWAF_LOG_PATH", '/home/username/public_html/wp-content/wflogs/');
include_once '/home/username/public_html/wp-content/plugins/wordfence/waf/bootstrap.php';
}
?>
ok thanks but i didnt understand. what must i do?
there was a working .user.ini file before.
now there is only .user.ini.bak file. but wordfence and site is tsill working. or something is not working which i do not even notice? or what must i do?
Hi @ketanco,
Wordfence will create a user.ini, php.ini, or .htaccess based on your web software.
So as long as you see one of these files in your document root, you should be good to go!
Dave