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

AI-Powered Soil Analysis for Precision Nutrient Management: Revolutionizing Agriculture

In the ever-evolving landscape of modern agriculture, artificial intelligence (AI) is emerging as a game-changing…

1 day ago

IoT Applications in Enhancing Manufacturing Flexibility

The Internet of Things (IoT) is reshaping the way we live, work, and produce goods.…

1 day ago

AI-Driven Process Optimization in Continuous Manufacturing

Introduction Have you ever wondered how some manufacturing industries consistently deliver high-quality products while minimizing…

1 day ago

Implementing IoT for Real-Time Monitoring of Livestock Feed Intake

In the ever-evolving landscape of modern agriculture, the integration of Internet of Things (IoT) technology…

1 day ago

Implementing IoT Solutions for Remote Equipment Diagnostics

Introduction Have you ever imagined diagnosing equipment issues without even being on-site? Welcome to the…

1 day ago

Leveraging AI for Inventory Management in Smart Manufacturing

In the ever-evolving world of manufacturing, staying competitive means adopting innovative solutions to optimize every…

1 day ago

This website uses cookies.