After changing an account's username or transferring an account from another server, the sites on the account will give Internal Server Errors. The error log will contain errors similar to the following.
[08-Jun-2022 10:15:04 UTC] PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
[08-Jun-2022 10:15:04 UTC] PHP Fatal error: Unknown: Failed opening required '/home2/username/public_html/wordfence-waf.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in Unknown on line 0
Changing an account's username or transferring an account to a server with a different home path will not update customizations made to the .user.ini files located in the user's home folder. This will cause WordFence to access wordfence-waf.php at an incorrect location.
Edit the user's .user.ini file in the user's home folder (i.e., /home/username) and correct the auto_prepend_file path value.
; Wordfence WAF
auto_prepend_file = '/home/username/public_html/wordfence-waf.php'
; END Wordfence WAF