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

Read The Alpha’s Warlock Ebook Here

The Alpha's Warlock In "The Alpha's Warlock," the narrative centers around two main characters: Alpha Kael,…

9 hours ago

Embracing Imperfections: The Path to a Happier Life

embracing imperfections  Let’s talk about something that touches each of our lives in one way…

20 hours ago

History of The Cold War: A Tense Standoff

The Cold War: A Tense Standoff Introduction The Cold War was not just a period…

1 day ago

The Birth of Bitcoin: A Digital Revolution

The Birth of Bitcoin Introduction In a world where traditional finance often feels cumbersome and…

1 day ago

Read The Broken Mute’s Revenge Ebook Here

The Broken Mute’s Revenge In "The Broken Mute's Revenge," the story revolves around a young…

1 day ago

Fostering Student Autonomy: Self-Directed Learning Strategies for Success

Introduction Imagine a classroom where students take the reins of their own education, setting their…

2 days ago

This website uses cookies.