How To Fix Fatal Error Warning In WordPress

Last updated on July 28th, at 10:22 am

Fatal Error Warning WordPress

Issues with WordPress can result in several fatal error warning messages being displayed on your screen. If your site stops working because of some fatal error warning, don’t freak out.

WordPress CMS is easy to use, and the good thing about WordPress is that the error you are seeing on your site is most likely been already reported and resolved by someone before you.

Most of the time WordPress users face this error after installing/updating plugin or theme or after adding some kind of code.

Check out: How To Optimize Images For The Web Before Uploading

What Causes Fatal Error Warning in WordPress?

WordPress fatal error can be caused due to several factors such as:

Bad Coding – Any code may develop bugs and plugins are no exception. A poorly coded plugin will cause problems regardless of what theme and plugins you are using.

Conflict with WordPress – Plugin code can be incompatible with the code used in the WordPress core files. Due to this, most plugin developers update their plugins after a new version of WordPress has been released to ensure that their plugin is still compatible.

Unfortunately, many plugin developers do not update the plugin for compatibility with the newer version of WordPress, which is why you need to be extra careful when installing older plugins.

Do not install a plugin if you see information like this (see image below)
Fatal Error Warning WordPress
You should check if the plugins are compatible with the latest WordPress before you choose to install or update.

Conflict with Another Plugin – Plugins do not always play nice together. A common scenario involves two similar plugins doing the same task. If you have both plugins activated, WordPress plugin conflict is bound to occur.

Conflict with WordPress Theme – Theme functions are contained in the file – function.php and a plugin adding similar functionality to what exists in your theme, will result in a conflict and cause a fatal error.

Check out: How to Display last Updated Date Of Your Posts in WordPress

How to Fix Fatal Error In WordPress

Even though error itself looks quite scary because it takes down the whole site, It’s quite easy to fix.

Instances that can cause Fatal Error Warning in WordPress

1 Theme

If you get this Fatal Error Warning in WordPress immediately after installing or updating the theme.

Then the very first thing you should do is delete it from your server. But if you are locked out of the WP admin dashboard, you will need to access your server via FTP or log in to cPanel.

In cPanel under file manager, navigate to WP-content folder > Themes. Under the themes folder select your theme, right-click and choose “rename”

Just change the theme folder name from ‘123theme’ to something like ‘123theme-old’ then save it.

This will deactivate the theme that caused the Fatal Error Warning in WordPress and bring your site back to life as WordPress reverts to a default theme.

See also: How to Inline Critical CSS above-the-fold With Autoptimize

2 Fatal Error: Issue With A Plugin

Typically, if an error occurs with a plugin, due to compatibility between an outdated plugin becoming incompatible with a newer version of WordPress you may get a “Fatal Error” message that can affect your entire site.

In such cases, the ‘Fatal error’ clearly indicates that the error is caused by an incompatible plugin, and it also tells you which plugin is causing the error.

All you have to do is to deactivate the rogue plugin by renaming the plugin folder as described above.

You can refer to our step-by-step guide on How to deactivate a Rogue plugin when locked out of the WP-admin dashboard.

If your site still showing the same error, the next step would be to disable all plugins.

Go to the wp-content folder and rename the plugins folder to something else like plugins-old this will disable all plugins on your website.

If this resolves the error rename the plugin’s folder name to its original name. This will allow you to see all the installed plugins on your website but deactivated.

Now, Enable one by one and test your website, to see which plugin is causing the Fatal Error Warning in WordPress.

This way you can pinpoint the offending plugin that caused the problem in the first place. Deactivate and delete the plugin.

Check out: How Do I Fix Leverage Browser Caching In WordPress?

3: Delete the .htaccess file

If disabling or deleting plugins and theme doesn’t fix the fatal error, then another thing you can try is deleting the .htaccess file or rename it as .htaccess-old.

Warning: Make sure you keep a backup copy of it.

If your site starts working again, after deleting the .htaccess file, then you know the problem.

It’s possible that one of the plugins installed on your site may have injected some code in the .htaccess file causing this error.

Create a new .htaccess file

To create a fresh new .htaccess file, just go to settings > Permalinks > select the permalink which you are using, then click on save settings. WordPress will automatically create a new default .htaccess file. Now you can safely delete the old .htaccess file.