How to Fix WordPress Fatal Error

Home - WordPress Fixes - How to Fix WordPress Fatal Error
wordpress-fatal-error

How to Fix WordPress Fatal Error

Have you ever visited your WordPress website only to find a WordPress fatal error that stopped it from working? You should not freak out because you can fix the error.

In most cases, fatal errors occur from your theme or plugin. Either during an installation, update, or addition of code.

In this article, you will learn how to fix fatal error in WordPress, and the reasons behind this scary error.

Causes of WordPress Fatal Error

Here are some causes of this error:

  • Theme conflict– the functions.php file of your theme keeps most of the theme functions. The basis of extending the functionality of a theme through functions is similar to that of functionality addition via a plugin.
  • Conflict with WordPress– Your WordPress plugin code might be incompatible with that in the WordPress core files. As a result, some plugin developers make updates to their plugins whenever there is a new WordPress version release. This is to ensure their plugin remains compatible with WordPress core files. Sadly, most plugin developers do not update their plugins. For this reason, you should be cautious when you install old plugins.
  • Wrong coding-any plugin with poor coding results to issues, irrespective of your plugins or theme.
  • Conflicting plugins– in some cases, WordPress fatal error occurs due to WordPress plugins conflicting with each other, especially if the plugins provide the same functionality.

How to Fix WordPress Fatal Error

The WordPress fatal error is scary to most WordPress owners, as it takes the entire website down. Nevertheless, it is easy to fix this error by fixing the causes given below:

1. Themes

Did the error occured during upgrade or installation of your theme? If so, the first action is to delete the theme from your hosting server. Alternatively, modify the name of the folder.

To do so, use FTP to access your server. Remember this error brings down your whole website.

Next, you need to locate your theme folder by going to WP-content>> themes. Here, you can either rename or delete your theme. As a result, your WordPress goes back to default theme, taking your website back online.

2. Plugins

The other cause of WordPress fatal error is plugins. If your website shows the error after the above step, then your plugins might be the cause. To fix this issue, go to WP-content folder>> plugins and rename that folder. As a result, all your website plugins are disabled.

If this action fixed the error, rename the folder to the original name to see all plugins available on your website. Next, find the error-causing plugin by enabling one by one while checking if the website is working.

plugin-conflict

3. Htaccess File

In some cases, you might fix your theme and plugins but still face the error. In such a case, you need to delete the .htaccess file to fix WordPress fatal error.

However, remember to keep a backup copy of the .htaccess file because you might need it in future.

If deleting the .htaccess fixed the error, you need to save the changes.  To do so, go to Settings>> Permalink>> Save settings.

Note: To implement all the above, you must access the database because your WP Admin is inaccessible.

Here is how to work in phpMyAdmin using the cPanel dashboard:

  • First, go to the search bar and type “PHP.”
  • After that, click on “phpMyAdmin” icon.

The phpMyAdmin have different versions with different user interface. However, the steps remain the same. Here is the process:

  • Go to the left column and click on the database.
  • In the same left column, click on the “WP-options.”
  • Next, click on the right arrow to navigate to the next page.
  • Locate the table for “active-plugins,” as you need to edit that table.
  • Find the “template” and “stylesheet” table, because you also need to edit the table as shown below.

NB: You should not perform step 4 and 5 continuously. Instead, use the WordPress fatal error message, to decide where you should start. If a plugin is the issue, go to step 4, and if your theme is the cause, proceed to step 5 as show below.

Here is how to clear content in the table as shown in step 4 and 5 above:

  • Click on the “Edit” button on the left side.
  • Next, cut (control +c) all the content in the large box, and then save it in a note pad. After that, all that content from the box.
  • Now, click on the “Go” button.

To know if the above steps have helped to fix WordPress fatal error, refresh the homepage of your website to see if it is live. If your website loads, then the cause of this error is either your plugins, theme, or both.

If the cause of the error is your theme or plugins, yet the solution failed, contact the developer of that theme or plugin.

Final Thought

If the cause of your WordPress fatal error is your theme or plugins, then it is easy to deactivate them. Nevertheless, the most difficult thing is to determine how to fix the error. In most cases, you can fix the problem through a simple theme or plugin update. If you are beginner or unable to fix the error, you can seek help from your developer. Contact us, we can help you to fix these errors.

If you have any suggestion related to this topic, share your thoughts in the comments section.

CLIENTS REVIEWS