WordPress Wordfence Warning

WordPress
Warning Unknown?

Failed to open stream: no such file or directory in unknown on line 0

By CLICKONOLOGY

Imagine, you turn on your computer, load up your webpage and instead of seeing the magical creation you have spent months building, you see a big white screen with just three lines of text!

Blown up, it basically says this below. . . 

Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 
Fatal error: Unknown: Failed opening required '/home/.../public_html/wordfence-waf.php' ... in Unknown on line 0

Normally, this occurance can happen if the Wordfence plugin has been removed or deactivated.

Curiosly, there was no Wordfence installed.

Research of the subject mentions e a file “wordfence-waf.php” in your root directory when Wordfence was active. Apparently ther can be references in “.user.ini” and “php.ini”.  You want to comment it out (I never delete entries).

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

Also remove the Wordfence code from your “.htaccess” file.

If that is not working, upload “wordfence-waf.php” to the root directory.

You have to edit the file to insert your USERDETAILS

// if (file_exists('/home/USERDETAILS/public_html/wp-content/plugins/wordfence/waf/bootstrap.php')) 
// define("WFWAF_LOG_PATH", '/home/USERDETAILS/public_html/wp-content/wflogs/');
// include_once '/home/USERDETAILS/public_html/wp-content/plugins/wordfence/waf/bootstrap.php';

In the “wordfence-waf.php” itself, it says. . . . 

// Before removing this file, please verify the PHP ini setting `auto_prepend_file` does not point to this

WHO ON EARTH IS GOING TO LOOK IN *.php files before deleting a plugin??

THERE IS ONE OTHER WAY. . . .

Contact your Hosting company. 

In this case, Alphakor in Windsor, who was this particular Hosting company, thankfully rebuilt the website on it’s server and “Hey Presto!” up came that friendly looking website!

One last tip.  

If you have your websites backed up by a plugin, UpdraftPlus or whatever, good luck at accessing them when you can’t even get into your WordPress account!

Make sure you download your backups to a local drive regularly!

Spread the word

Clickonology Comment Policy

Clickonology  welcomes any relevant and respectful comments.
Off-topic comments may be removed.

clickonology.com thanks you reading our blog