WordPress

Fatal Error: Unknown Failed To Open – How to fix the Wordfence-waf.php problem

Welcome, in today’s tutorial, we will learn how to fix the error: “fatal error, Unknown Failed To Open” – how to fix the wordfence-waf.php problem. This is a wordfence error caused by the plugin not installing properly. Or some files missing during this installation, this would cause the website to be broken when it is loaded.

Studying the error calls, it seems the error is addressing to the Wordfence plugin installed. This is because we have have activated all plugins back to functionality. And once the website is loaded with these plugins, it gets broken since it can’t load the required file.

Read More

How to Build a Wi-Fi based Smart Farm Monitoring System Project.1
How to design Motion Detector Smart Street Lights System.

Removing all Traces of Wordfence Plugin from cPanel

Step 1: Go to the php Tree

Locate the phpMyAdmin on the cPanel

In order to fix this fatal error on your website, you need to delete all instances of Wordfence plugin phpMyAdmin database. To do this, go to the cPanel dashboard, click on phpMyAdmin as shown above. It will open a new tab in which you can select Database. You should be able to see your cPanel username in the left-hand pane.

The Database

Step 2: Identify and all that .wf extension tree in the DB

dropping the Wordfence plugin extensions on phpMyAdmin

Click on the left pane with your username. This will pop up the DB structures, and then you cn see all the plugin trees. locate the tree with _wf extensions. Click on each of these individually and drop them on the right hand side as highlighted, and once this is done, proceed to the next step.

Step 3: Delete the Wordfence Folder in the Plugin Folder

Head over to the wp-content folder and double click on the plugins folder. Down the line, you will find the Wordfence folder. Delete this folder.

Step 4: Delete Wordfence Code Lines in Hidden File

Enable hidden files for this to work

Based on the error shown in the image earlier, the error came from the files user.ini and wordfence-waf.php . What we will do is to search for these files on the cPanel search. After we have enabled the show hidden file option as shown above. This would then show us the file.

Locating the user.ini file for Wordfence

Double click on this file and open with UTF-8 encoding. The go and locate the code line that reads auto_prepend_file = ‘/home2/xxxx/public_html/wordfence-waf.php’. Once located, comment out this line of code by placing a # in front of it as shown below. Save the changes and move to the next step of restoring and recovering your crashed website.

comment out the line of code

Next the other file wordfence-waf.php, do the same search for this on the search box, and open it like the first one. Locate the line of code that read php_value auto_prepend_file = /home2/xxxx/public_html/wordfence-waf.php’ and comment out the lines of code there.

Comment out the line of code for

Save the changes made on these two files and then go back to your website and refresh it again.

On refreshing, this error disappears and we have control of our WordPress backend dashboard again. As shown below.

The WordPress backend dashboard

Finally, you have learnt how to Restore and Recover Your Crashed Website with these few steps. Bravo! Just a couple of more things to tidy up. Remember the plugins were all deactivated and removed earlier, when you click on the plugins, there will be no plugins to show.

Head back to cPanel and change the name back to plugins and save it and refresh the page of your WordPress Dashboard and all your plugins will reappear, with the exception of the Wordfence plugin because it has been deleted. You can install this plugin again if you need it.

The plugins reappears

Conclusion

The beautiful front end

Even the front end for the visitors has been beautifully replaced and there are no more errors or crashed gibberish displaying. Just the WordPress Theme contents. This is how we fix the fatal error on your crashed website using this sample website as a case study.
Tell us what you think in the comment below. Do you have similar problem? Were you able to follow the steps outlined here and solve it yourself?
If you can’t solve the problem, you can reach us online for quick assistance.

smartechlabs

Recent Posts

The Great Stink of 1858: When London’s Streets Became a Stinky Battlefield

When London’s Streets Became a Stinky Battlefield Picture this: It’s a scorching summer day in…

2 days ago

Cleopatra: The Queen Who Played the Ultimate Game of Thrones

 The Queen Who Played the Ultimate Game of Thrones Step aside, Hollywood—Cleopatra VII is here…

2 days ago

The Great Emu War: When Australia Took on Birds and Lost

When Australia Took on Birds and Lost In a tale that sounds like the plot…

2 days ago

The Dance Plague of 1518: When Joy Turned to Madness

When Frenzied Feet Turned Fatal In the sweltering summer of 1518, the picturesque town of…

2 days ago

“Lost in Time: The Roanoke Colony’s Disappearance”

 Unraveling the Mystery of the Lost Colony In the summer of 1587, a group of…

2 days ago

The Last Trace by Petronella McGovern eBooks Summary

The Last Trace by Petronella McGovern is a gripping psychological thriller that delves into the…

3 days ago