Website Broken after Using Defender

Website has crashed completely now. Removed Wordfence.php file as advised by Defender. Wordfence was already disabled. Unable to log in to WP to restore back up. This is now website output.

Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

Fatal error: Unknown: Failed opening required '/home1/movebetter/public_html/redesign02/wordfence-waf.php' (include_path='.:disappointed:opt/php70/lib/php') in Unknown on line 0

  • Adam Czajczyk

    Hello Michael,

    I hope you're well today and thank you for your question!

    Defender reports files that are out of their expected locations (doesn't belong to WP) or are identified as infected with some suspicious/malicious code. I believe though it shouldn't report the "wordfence-waf.php" file (this is the one you have removed, is that right?) as it's an integral part of a well known and popular security tool.

    Since the file is deleted, you'd need to remove references to it. To do this, access your site via FTP (or cPanel's "File Manager") and look for these two files:


    You might need to make sure that "show hidden files" option is enabled to see them. If you find a reference like this one inside them:

    ; Wordfence WAF
    auto_prepend_file = '/xx/xx/public_html/wordfence-waf.php'
    ; END Wordfence WAF

    remove it and that should bring the site back.

    Let me know please if that worked.

    The "wordfence-waf.php" file is the file related to WordFence Application Firewall. If it gets removed, the site goes down but removing aforementioned references should fix the issue. After that though you might need to disable WordFence firewall or entire WordFence and then set firewall again.

    I'll also examine that detection issue and consult with Defender's developer.

    Kind regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.