Wordfence Issue -- Site Won't Run

What issue or error are you experiencing?

I’ve pulled another site down and I’m getting an odd error related Wordfence. I searched in the forums and I found two others having the same (or similar) issue, but no resolution:

Wordfence Error - Site won’t load

Site won’t load at all, seems to be related to Wordfence and an incorrect path

This is what I see:

The “failed opening” path appears to be the site path on WP Engine, not my local path. So I guess that would make sense that it’d cause an error. However, I tried deleting the plugin locally and I’m still getting the error.

Aside from deactivating Wordfence before pulling it locally, has anyone else found a way around this issue?


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc


System Details

  • Local Version:

Version 9.0.1+6673

  • Operating System (OS) and OS version:

Windows 10 Pro


Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Well, I tried deactivating Wordfence temporarily on the server, then pulling to Local again. I did this twice – once using the “Pull” button in the bottom right of the local site and once by going to the “Connect” section, disconnecting the site from WP Engine, and then pulling to existing. I’m still getting the same error!

In case it was caching-related, I also tried loading the site in a Chrome incognito window and also a completely different browser. Why would this continue happening if I’ve deactivated Wordfence on the site I’m pulling from?

Hi, @relish27.

Check for a .user.ini file in your site’s main WordPress folder (at app/public) on your local machine. You may have to show hidden files in Windows Explorer before you can see it.

That file probably includes an auto_prepend_file line that’s trying to load the wordfence-waf.php file like this:

; Wordfence WAF
auto_prepend_file = '/nas/content/live/[yoursitename]/wordfence-waf.php'
; END Wordfence WAF

If that’s the only thing in the file, you can delete the .user.ini file locally.

Once it’s gone the fatal error should also disappear.

1 Like

Oh my gosh, that worked! THANK YOU, THANK YOU!

I wonder, is there a way to update the other two forum posts I referenced, so that all three posts (those two and mine) refer to this answer? It would be nice to prevent others from experiencing this headache by helping them find the answer sooner.

2 Likes

Hi @relish27

Great feedback! Since both of those posts were older and didn’t have much in terms of troubleshooting I went ahead and just archived them to help reduce any confusion. Happy Developing :slight_smile:

1 Like

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.