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
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.
Step 2: Identify and all that .wf extension tree in the DB
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
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.
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.
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.
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.
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.
Conclusion
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.