Menu

Troubleshooting and fixing fatal errors in WordPress

Updated on January 25th, 2021

Maybe you’ve just finished migrating your site to Flywheel, or you’ve added a new plugin or theme – and all of the sudden you’re met with a scary error message like this when you try to view the home page or log into the WordPress admin area:

WordPress critcal error message

Never fear! In this help article we’ll walk you through a couple of different ways to track down the source of the error and get your site back up and running.


Table of Contents:

1. If you have access to the WordPress admin email account
2. If you don’t have access to the WordPress admin email account


If you have access to the WordPress admin email account

WordPress 5.2 introduced PHP error protection which makes resolving these kinds of problems a bit easier than before.

  1. Check the site administrator’s email for a message like this (subject: ” …Your Site is Experiencing a Technical Issue”):
    WordPress critical error email message
  2. If you can’t access the WordPress dashboard, put the site in recovery mode with the link provided in the message.
  3. Then try to log into the WordPress dashboard.
    recovery mode WordPress login
  4. Look for errors related to plugins or themes, like this one:
    WordPress recovery mode plugin failed to load error
  5. In this example, head over to Plugins screen to investigate. Turns out Revolution Slider has an error. Clicking the Deactivate link should allow the site to load.
    WordPress recovery mode plugin fatal error
  6. Once the plugin is deactivated, you can exit recovery mode and test the site again.
    exit recovery mode in WordPress dashboard
  7. From here, you’d want to update the plugin to the latest version (if an update is available), or contact the plugin developer for further insight. Reactivating the plugin would result in another fatal error, so it’s best to leave it inactive until more information can be gathered.

If you don’t have access to the WordPress admin email account

Troubleshooting fatal errors through email is slightly less cumbersome, however there are still ways to fix your site.

If your site or WordPress dashboard goes down immediately after activating a plugin or theme, that’s usually going to be the source of the issue. Sometimes the site will display a fatal error when nothing has changed recently, and it can be difficult to determine which plugin or theme is to blame.

This is where WP_DEBUG can come in handy.

  1. Head over to the Advanced tab for the site in your Flywheel dashboard and turn on WP_DEBUG.
    enable WP_DEBUG in your Flywheel dashboard
  2. It takes a couple minutes for this to complete, after which you can head back over to your site and look for any error messages similar to this:
    WP_DEBUG output
  3. At first glance, these types of error messages can be a bit intimidating, but once you know what to look for, these messages are quite helpful. The area highlighted below is a “fatal error”. Fatal errors are critical errors, and stop PHP scripts from running/executing, which can prevent sites from loading.
    Fatal error shown when WP_DEBUG is enabled
  4. Within that fatal error message there is a path to a plugin, revealing the plugin that is most likely causing the issue.
    plugin path in fatal error message
  5. Normally to deactivate a plugin, you would just log into the WordPress dashboard and deactivate it on the Plugins page. However, due to the error, it’s likely that the WP admin area is inacessible. However, there is a workaround using SFTP access.
  6. Log into SFTP, then navigate to the wp-content/plugins directory for the site.
    WordPress plugin directory listing in SFTP client
  7. In this example, the problem plugin is Revslider. So you’d want to right click on the revslider directory and rename it, for example revslider_bk. (In this case “_bk” means “backup” but you can rename this folder to whatever you like.)
    rename plugin directory in SFTP
  8. In your browser, refresh or go back to the wp-admin page and you should now be able to log in!
    WordPress Login Page
  9. To get the plugin to work with your site, you’ll need to update the plugin or contact the plugin developer for more information.

Note

If a theme is deactivated using the above method, your site will not have a current active theme, which means the site will not disply. You’ll need to activate another theme via the WordPress admin area.

Still need help?

Hopefully one of these two methods is helpful in determining what’s causing a fatal error on your site. If you have any trouble reading error messages or deactivating a plugin or theme, our Happiness Engineers are here 24/7 to help.

Was this article helpful?

Getting Started

New to Flywheel? Start here, we've got all the information you'll need to get started and launch your first site!

View all

Account Management

Learn all about managing your Flywheel user account, Teams and integrations.

View all

Billing

Everything about billing, invoices and payments can be found here.

View all

Features

Flywheel hosting plans include a ton of great features. Learn about how to get a free SSL certificate, set up a staging site, and more!

View all

Platform Info

All the server and setting info you'll need to help you get the most out of your Flywheel hosting plan!

View all

Site Management

Tips and tricks for managing your sites on Flywheel, including going live, troubleshooting issues and migrating or cloning sites.

View all

 

Flywheel help

Help is just a click away! Log into the Flywheel dashboard to instantly chat with an expert, open a ticket, or follow along with in-depth documentation. We happily offer support 24 hours a day, 7 days a week, 365 days a year!

Log in

Try Flywheel today

Launch your next WordPress site in minutes.

 Free migrations  24/7/365 support  14‑day demo sites