Title: Unknown: Failed opening required
Last modified: October 30, 2018

---

# Unknown: Failed opening required

 *  Resolved [mazmc](https://wordpress.org/support/users/mazmc/)
 * (@mazmc)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/unknown-failed-opening-required/)
 * Hi all,
 * I recently move my wordpress site into a sub directory. Before doing so i deleted
   the Wordfence plugin that was installed, however im not getting error:
 *     ```
       Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
   
       Fatal error: Unknown: Failed opening required '/var/sites/c/crosstowndoughnuts.com/public_html/wordfence-waf.php' (include_path='.:/usr/newage/lib/php') in Unknown on line 0
       ```
   
 * I’ve removed any reference to Wordfence in the htaccess and php.ini files. I’ve
   tried moving the wordfence-waf.php file from the new sub directory back to the
   root. I’ve tried deleteing the Wordfence folder in the Plugins folder. No luck.
 * Can anyone help with how i can get this sorted? Very frustrating that this is
   happening even after the plugin was uninstalled.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funknown-failed-opening-required%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [wfasa](https://wordpress.org/support/users/wfasa/)
 * (@wfasa)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/unknown-failed-opening-required/#post-10835694)
 * Hi [@mazmc](https://wordpress.org/support/users/mazmc/),
    If you are getting 
   that message it means there must be an auto_prepend_file value left somewhere
   which is attempting to load the wordfence-waf.php. On some server setups the 
   auto_prepend_file value can be set in .user.ini.
 * If you’re sure you’ve removed it all, it’s possible that your .htaccess could
   be cached. That would normally clear in 5-10 minutes but you could possibly check
   with your host to see if they have a longer cache.
 * Either way, just putting even an empty file called wordfence-waf.php in both 
   roots should stop the error from happening.
 *  [wfdave](https://wordpress.org/support/users/wfdave/)
 * (@wfdave)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/unknown-failed-opening-required/#post-10903252)
 * Hi [@mazmc](https://wordpress.org/support/users/mazmc/),
 * We haven’t heard back from you in a while, so I’ve gone ahead and marked this
   thread as resolved.
 * Please feel free to open another thread if you’re still having issues with Wordfence.
 * Thanks!
 *  Thread Starter [mazmc](https://wordpress.org/support/users/mazmc/)
 * (@mazmc)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/unknown-failed-opening-required/#post-11209738)
 * Hi, sorry solving this got put on hold for a bit.
    I’ve tried the solution above
   but still get the error:
 * Warning: Unknown: failed to open stream: No such file or directory in Unknown
   on line 0
 * Fatal error: Unknown: Failed opening required ‘/var/sites/c/ju0ly.hosts.cx/public_html/
   wordfence-waf.php’ (include_path=’.:/usr/local/php-5.6.37-flock/lib/php’) in 
   Unknown on line 0
 * We have moved to a new host and have a new site there, but i still need a working
   version of this old site as a backup. [http://ju0ly.hosts.cx/v1](http://ju0ly.hosts.cx/v1)(
   host server is 185.119.173.224)
 * How can i get rid of any wordfence reference and get the site working?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Unknown: Failed opening required’ is closed to new replies.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

## Tags

 * [Failed opening required](https://wordpress.org/support/topic-tag/failed-opening-required/)

 * 3 replies
 * 3 participants
 * Last reply from: [mazmc](https://wordpress.org/support/users/mazmc/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/unknown-failed-opening-required/#post-11209738)
 * Status: resolved