nginx服务器的情况,针对一个Wordpress网站,设置方法是在php.ini上查找
auto_prepend_file
修改为:
auto_prepend_file = '/你的wordfence生成的路径/wordfence-waf.php'
同一个服务器拥有多个wordpress站点的话,且都安装了Wordfence的话,是在php.ini上则这样写:
[HOST=site-one.com]
auto_prepend_file = '/path/to/public_html/site-one/wordfence-waf.php'
[HOST=site-two.com]
auto_prepend_file = '/path/to/public_html/site-two/wordfence-waf.php'
[HOST=site-three.com]
auto_prepend_file = '/path/to/public_html/site-three/wordfence-waf.php'
根据官网文档,如果你的域名必须要使用www才能访问的话,HOST这里也要加上www:
[HOST=www.site-two.com]
auto_prepend_file = '/path/to/public_html/site-two/wordfence-waf.php'