Moving WordPress Site with Wordfence Plugin

I recently moved a wordpress site to a different host and after all the files and database were updated kept getting the following error:

2018/01/31 12:10:11 [error] 1857#0: *165 FastCGI sent in stderr: "PHP message: PHP Warning:  Unknown: failed to open stream: No such file or directory in Unknown on line 0
PHP message: PHP Fatal error:  Unknown: Failed opening required '/home/olddomain/public_html/wordfence-waf.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0" while reading response header from upstream, client: 65.47.199.226, server: domain.com, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "domain.com"

After reviewing the KB files here:
https://docs.wordfence.com/en/After_moving_a_site_or_deleting_some_files,_I_see:_PHP_Fatal_error:_Unknown:_Failed_opening_required_/var/www/html/wordfence-waf.php
https://docs.wordfence.com/en/Web_Application_Firewall_FAQ#How_can_I_remove_the_firewall_setup_manually.3F

I was able to modify the .user.ini file and the wordfence-waf.php file to set the correct path and all is well.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.