WordPress is so popular that several WordPress Developers and company have created plugins for all purposes. You can literally achieve anything with WordPress.
This is what made WordPress so popular, but with this comes the notorious “WordPress Fatal Error”.
Fatal Error is an error where the WordPress stops working completely due to an error which was caused in a plugin or theme. This error is mostly due to a conflict between a theme or plugin with WordPress.
In WordPress, WooCommerce is also used by several website owners to run an eCommerce website on WordPress.
WooCommerce also depends on plugins for its extra functionality. This sometimes makes the store owner face weird problems like Fatal Error or Maximum Execution Time Error.
If you are facing Maximum Execution Time Exceeded WordPress Error, then we have a detailed post on How To Fix Fatal Error Maximum Execution Time Exceeded WordPress Error.
Video on Fixing Fatal Error
The method that we are sharing is easy but you need to have paitence. In 90% cases this method solves the Fatal Error WordPress and Fatal Error WooCommerce problem.
The method doesn’t require you to have any technical knowledge or any programming skills.
So, I hope you have some time to go through the tutorial and fixing the Fatal error problem.
So Lets get started 😃.
How To Fix Fatal Error WordPress?
So, lets get started first with debugging.
Case 1 – The 90% Cases
If you have recently installed or updated any plugin or theme. Then in most of the cases the problem is with that particular plugin or theme.
So let’s assume that the problem was in a plugin called – “Niraj the Blogger“. I know, there’s no plugin by that name and Name is like a Movie.
Case 2 – The Unknown
But what If you don’t know why you are facing the WordPress Fatal Error. Whether its a Plugin or theme.
Then, what can you do?
Solution – Fixing the fatal error
Whether you know why the fatal error has occurred or you don’t have even 1% Idea why it happened.
Here is what you need to do to find the fatal Error.
- Login in to your Hosting Panel / cPanel.
- Then go to File Manager in your Hosting Panel.
- Navigate to the WordPress Folder.
- Find error.log / debug.log file.
- You can find this file in Root Folder / WP-Content Folder.
- Open the error.log file and check for the latest error with date and time given in the error log.
- The error log records the file path where the error was triggered.
- Now you can easily find the theme or plugin that caused this error.
- The error log will contain the file path – “/home/yourusername/public_html/wp-content/plugins/niraj-the-blogger/plugin-file.php“.
- This is the plugin, you just need to deactivate the plugin to get your WordPress back to Normal.
Deactivating the plugin without the admin panel is very easy. Now since you are already logged in to your cPanel and you are currently in your WordPress root directory.
Now you need to navigate to WordPress Root Folder -> WP-Content -> Plugins and rename the particular plugin folder. Like “niraj-the-blogger ” to something like “BACKUP-niraj-the-blogger“.
Now login to your WordPress Admin section and visit the WP_Admin -> Plugins. You will find an error notice that the plugin has been deactivated.
Now, check whether the Fatal Error has been fixed or not. In most cases it has been fixed and you will be able to get access to the wp-admin.
Note: If the particular folder method doesn’t work, then it means the error is in another plugin. To fix it, rename the plugins folder to plugins2. The folder is located in WordPress root -> WP-Contents.
How To Fix Fatal Error WooCommerce?
Fixing WooCommerce Errors are a little different. Although using the WordPress fatal error method you can fix it. But this sometimes don’t work on WooCommerce.
Or what if you just want to fix the WooCommerce error which the rest of your website and blog to work like normal.
Then, this is what you will do to fix the WooCommerce Fatal error.
- Login to cPanel -> File Manager.
- Navigate to WordPress Root Folder -> WP-contents -> PLugins
- Rename the WooCommerce folder to “BACKUP-woocommerce”.
- Check the fatal error. It should have been fixed.
By deactivating the WooCommerce, most of the WooCommerce plugins will stop working. Which will also stop the plugin to work which is causing the Fatal error.
But wait, the fatal error has not been fixed.
Now you need to find the culprit, oh I mean the Plugin that is causing the fatal error.
Here is what you need to do to find the plugin.
- Login to WP-Admin
- Go to WP-Admin -> Plugins -> Installed Plugins.
- Deactivate all the plugins that are related with woocommerce.
- Now go back to your cPanel and rename the “BACKUP-woocommer” plugin to “woocommerce”.
- Activate the woocommerce from your WP-admin.
- Now you need to find the Culprit plugin 🕵️.
- To find it, start activating the plugins related to woocommerce. One-by-one.
- You will find that while doing it one-by-one. You will encounter the Fatal error.
- Now you know the plugin name.
- Go to cPanel -> File Manager -> WordPress Root -> WP-Contents -> Plugins and delete the particular plugin folder.
- Note: Delete the plugin folder that caused the error, not the Plugins folder.
Try logging in back to your WP-Admin. The error has been fixed.
Avoid that plugin as it is resulting a fatal error. If you have purchased this plugin. Then contact the plugin developer and ask them to check for the error.
They may come up with a solution to make that plugin work without throwing a fatal error.
How To Fix Fatal Error using Database Method? 🕵️
Fixing using the database method is totally different when it comes to process it but the way WordPress processes it is totally same like the above methods.
Let me explain How?
When we rename any particular plugin folder to a different name, the WordPress database will treat that plugin as deactivated.
Because all active plugins are saved into database in an array. The array contains the filepath of the plugins. Since now the filepath has been changed, wordpress will not find the plugin in that filepath which is saved in the database.
So, the WordPress system will trigger an error popup that only admin can see.
The Database method is also the same, here we will delete the filepath of the plugin. So that will make the plugin deactivated.
Basically it’s the same method. 2 + 3 = 5 or 3 + 2 = 5. So if you are comfortable with the database method, I have given the complete tutorial below.
Note: Database method is a risky way, since you will be interacting with the WordPress Database directly. If you did any thing wrong, your entire WordPress may stop working.
- Login to your cPanel.
- Search for phpMyAdmin and click on it.
- This will open your database.
- Now Click on your database name on the left.
- select “wp_options”.
- Search for “active_plugins”.
- Click on edit button. This will open a section, copy everything from “option_value” and save it to a notepad.
- Now delete the content inside “option_value” and save it.
- By doing this, it will deactivate the plugins and your WordPress will be back to normal.
- Incase you have a problem in your Theme, then you need to search for “template” and “stylesheet”.
- Now repeat the step 7 and 8. This will deactivate the current theme and switch to the default theme.
So this is how the database method works. You can fix the WordPress fatal error using this method, but you need to be little careful while doing it.
Get Professional Help? 😃
If you are overwhelmed with all this methods and don’t know how to to do it. Then you must visit GloriousThemes.com.
GloriousThemes is a WordPress Product company and the best thing I like is that they also provide WordPress Services.
You can easily hire them for any WordPress bugs and Error Fixing for as low as $30. They provide you 100% Satisfaction or Money return Guarantee. They also have 24/7 WordPress Management Service where you focus on your work, while they maintain your websites.
I hope this article has helped you to fix fatal Error on your WordPress website. If you have any queries, you can comment below or contact us.
Fatal Errors are the most troublesome Errors in WordPress and WooCommerce. This error is sometimes so notorious that it happens on on front-end. Which means the WP-Admin will keep working while the frontend is dead or sometimes vice-versa.
We love the simple technique of folder renaming that allows you to simply debug the error and fix it easily.