Enter

WordPress 101 / 11 min read

How to Access the WordPress Admin With a Fatal Error Warning

a laptop over a bed or sheets. The screen displays the WordPress Gutenberg editor

A fatal error warning is a frustrating issue that prevents access to the WordPress admin, effectively locking you out of your own site indefinitely. But don’t despair because there is a reliable way to gain access to your WordPress admin after a fatal error: Recovery Mode.

Let’s find out what fatal errors are and how Recovery Mode helps you bypass and solve them.

Key Takeaways

  • The most reliable way to access your WordPress admin after a fatal error is Recovery Mode.
  • Recovery Mode is a built-in feature that allows you to bypass problems that prevent you from accessing your admin.
  • You can access Recovery Mode from a link that WordPress will automatically email you or by manually inputting the Recovery Mode URL into your browser.

What Are WordPress Fatal Errors?

WordPress fatal errors happen when a fatal PHP error occurs, preventing your site from loading the scripts it needs to run properly. As you may know, PHP is the programming language WordPress is primarily written in and the one developers use to create custom functions. 

When a fatal PHP error occurs, the scripts your site needs to function cannot be loaded and your site crashes. These scripts may be associated with your WordPress core files, themes, or plugins.

After a fatal error, you may see a critical error screen when you try to log into your site or a message similar to the following:

WordPress error message reading "There has been a critical error on this website"

You may think there’s no solution, but there actually is a feature specifically designed to provide access to your WordPress admin after problems like this: Recovery Mode.

What is Recovery Mode and How Does it Help Access the WordPress Admin?

Recovery Mode is a built-in feature of WordPress since version 5.2 (2019). Since this version, WordPress automatically detects when a theme or plugin causes a fatal error on your site and sends a message to the administrator’s email address informing them of the situation.

The email message contains a link to access your site in Recovery Mode.

However, depending on the error screen you see, you may receive an email message. Still, there is a way to manually access Recovery Mode in cases where you don’t receive the email message. We’ll explore these methods further down.

Ultimately, recovery Mode allows you to access your admin dashboard and gives you the opportunity to solve whatever is causing the problem. For example, your site may be broken due to plugin and theme compatibility issues.

With Recovery Mode, you have a chance to bring your site back up.

2 Methods to Access Your WordPress Admin With a Fatal Error Warning

Now that we know what the fatal error is and how to bypass it to access your WordPress admin, let’s go into the step-by-step process of bringing your site up.

Method #1: Access WordPress Recovery Mode Via the Email Link

After detecting a fatal error with one of your themes or plugins, WordPress sends a message to the site administrator’s email address. If this is your site, you should have access to this email.

If you don’t own this site and have no access to the admin email, ask the administrator to either grant you access or follow along on the process. Alternatively, if you’ve lost access to the admin email, you can use method #2 in this article to access Recovery Mode.

Let’s get into the process.

Step #1: Access the Email

Assuming you have access to the admin’s email account, WordPress will send you an email with a link to access your site in Recovery Mode. The subject will be “Your Site Is Experiencing a Technical Issue,” and the content will give you some information about Recovery Mode.

Click on the link to access your WordPress site in Recovery Mode.

An email sent from WordPress to inform you that one of your plugins or themes is causing a fatal error

Step #2: Log in

The link will take you to your login screen. Notice the message clarifying that you’re in Recovery Mode.

Simply log in as you normally would.

The login screen for a WordPress site. A text box informs you that you're in Recovery Mode

Now you’re back in your familiar admin dashboard, and you can start troubleshooting the problem.

We’ll explore possible solutions to your problem further down in the article. But for now, let’s examine the alternative method for accessing your site in Recovery Mode.

The WordPress admin dashboard

Method #2: Access WordPress Recovery Mode By Using the Recovery URL

In some cases, you may get a fatal error screen that prevents access to the WordPress admin dashboard, but you still don’t get the WordPress email giving you access to Recovery Mode.

It could be because you no longer have access to the admin email address or for various other reasons.

In any case, you can access Recovery Mode manually by entering the Recovery Mode URL address into your browser’s address bar. The Recovery Mode URL address is as follows:

your-domain.com/wp-login.php?action=entered_recovery_mode

Simply input this URL in your browser’s address bar (remember to change your-domain into your actual domain):

A URL that leads WordPress users to enter their sites in Recovery Mode

You will land at the familiar login screen, where you can enter your credentials and access your admin dashboard in Recovery Mode.

From there, you can start troubleshooting the problem.

How to Recover Your Site After a Fatal Error: 5 Solutions

After gaining access to your WordPress admin with Recovery Mode, you still need to resolve whatever caused the issue in the first place to bring your site back up, as it will still be down.

Let’s explore 5 solutions to a fatal error that can restore your site to normal functioning.

Solution #1: Restore a Previous Backup in Recovery Mode

Backing up your site is essential for disaster recovery situations like this. Hopefully, you have a backup plugin that creates regular backups, and you can restore one of them.

We’ve used the UpdraftPlus plugin, and it’s very reliable. In this example, we’ll restore a backup with this plugin. Other plugins will have similar but probably slightly different steps.

How to Restore a Backup

Assuming you already have a backup, here’s how to restore it with UpdraftPlus. On your website’s dashboard, go to Settings > UpdraftPlus Backups.

In the section Existing backups, you’ll have a list of backups UpdraftPlus has created. Each backup will have a Restore button to restore that specific backup. Select the backup you want to restore and click Restore.

The "Existing backups" interface for the WordPress plugin UpdraftPlus

Now, you’ll be given the option to restore specific file types: Plugins, Themes, Uploads, Other, and Database. Check every type to perform a full restore, then click Next.

The "UpdraftPlus Restoration" interface for the WordPress plugin UpdraftPlus. Multiple checkboxes allow users to choose which elements they want to back up

On the following screen, click Restore, and the process will begin.

The "UpdraftPlus Restoration" interface for the WordPress plugin UpdraftPlus. The "Restore" button allows users to restore a WordPress backup

Wait for the restoration to complete. You’ll get a “Restore successful” message at the end. Finally, click on Return to UpdraftPlus configuration to finish the process.

The "UpdraftPlus Restoration" interface for the WordPress plugin UpdraftPlus. A "Restore successful" message tells the user that they've successfully restored their site to a previous state

Always create backups before installing or updating your plugins, themes, or WordPress versions. This gives you a recent checkpoint to go back to when emergencies like fatal errors happen.

Solution #2: Deactivate the Offending Plugin or Theme

If you received WordPress’s email on the admin account, the message should identify the plugin or theme that caused the problem in the following line:

In this case, WordPress caught an error with one of your plugins, [plugin name].

With that plugin or theme in mind, access Recovery Mode through the email or manual URL and deactivate it.

Option #1: Deactivate a Plugin

If WordPress identified a plugin as the root of the issue, the first step should be deactivating it. In our case, the email mentioned the Link Whisper Free plugin. So, let’s head to Plugin > Installed Plugins and deactivate it.

The Installed Plugins interface in WordPress. An arrow highlights the "Deactivate" button under a plugin

After deactivating the plugin, check back with your live site to see if it’s working again. If it is, then your site should be back on track.

However, if you plan to continue using your plugin or theme, you still need to determine the issue. To do this, you should create a staging or local environment and start troubleshooting.

Alternatively, you could contact the developer through the plugin’s WordPress.org page.

If you can’t figure out the problem and the developer isn’t able to provide support, you may need to look for a new plugin.

Option #2: Switch to a Default Theme

If the problem is instead a theme, then you should go to Appearance > Themes and switch to a default theme like Twenty Twenty-Four, Twenty Twenty-Three, etc.

The Themes interface in WordPress. An arrow highlights the "Activate" button on one of the themes

If your live site comes back up after switching to a default theme, that’s great, but you probably also want to keep using your theme.

Do the same as you would for a plugin: start troubleshooting or contact the theme developer for help.

What if the Email Doesn’t Specify a Plugin or Theme?

If the email with the link to Recovery Mode doesn’t specify a plugin or theme, you should deactivate all plugins and activate them one at a time to see if your live site comes back up. At some point, you will find the one breaking your site.

To do that, scroll to the top of the Installed plugins page and click the checkbox to select all plugins.

The Installed Plugins interface in WordPress. An arrow highlights the checkbox to select all plugins

Then, select Deactivate from the Bulk Actions dropdown menu.

The Installed Plugins interface in WordPress. An arrow highlights the "Deactivate" option in the Bulk Actions dropdown menu

Start activating each plugin individually and check back with your live site every time.

If you believe the problem is a theme instead of a plugin, go to Appearance > Themes and switch to a default theme like Twenty Twenty-Four.

Solution #3: Reupload Core WordPress Files

If you believe there’s a problem with the core files, reuploading them should wipe out the conflict and bring your site back up. Let’s explore how to reupload files automatically from your dashboard or, alternatively, manually through an FTP client.

How to Reupload Files Quickly From the Dashboard

The quickest and easiest way to reupload core WordPress files into your installation is to access your site in Recovery Mode, go to Dashboard > Updates, and click on Reinstall version X.X.X.

The Updates interface in WordPress. An arrow highlights the "Re-install version 6.6" button

It may take a few seconds, but you will land on your version’s About page when it’s done.

The About page for WordPress 6.6 after a successful update

How to Reupload Files Manually Using an FTP Client

The manual alternative if you can’t access your admin dashboard is manually uploading files via FTP.

First, go to WordPress.org’s Download page and download the latest version of WordPress.

WordPress.org's Download page. An arrow highlights the "Download" button.

WordPress will download as an archive, so use 7zip or WinRAR to unzip the archive and reveal the core files inside.

With the core files unzipped, enter your FTP credentials and connect to your web server. Navigate to your server’s public_html folder (sometimes named simply public).

The FileZilla interface. The left side contains the files in the local device and the right side contains the files on the remote server

Now, you must select every folder and file (except for wp-content) on the WordPress installation you just downloaded and drag them into your web server.

The FileZilla interface. WordPress core files on the local device are about to dragged and transferred into the remote web server

And with that, your core files will be overwritten, potentially wiping out any issues they may have that were causing the critical error.

Solution #4: Increase Your PHP Memory Limit

If your WordPress site has multiple plugins that demand a lot of memory, your site may crash and return a fatal error screen.

A low PHP memory limit is a common problem in relatively cheap hosting providers, which often offer limited resources. To increase it, you’ll have to modify one line from the wp-config.php file.

To access the file, use a hosting control panel like cPanel or FileZilla. Navigate to the public_html folder, then right-click wp-config.php, and select View/Edit.

Once inside the file, use CTRL + F or CMD + F to search for WP_MEMORY_LIMIT. If you find it, it’ll look like this:

define('WP_MEMORY_LIMIT', '64M');

Simply change 64M to 128M or 256M to increase your PHP memory limit. 128M should be enough for most sites, and 256M should be enough for sites that run resource-intensive plugins.

If you can’t find the line, you’ll simply have to copy and paste it. You must insert it above the line that says /* That's all, stop editing! Happy publishing. */, which is near the end of the file. It should look like this:

define('WP_MEMORY_LIMIT', '256M');
/* That's all, stop editing! Happy publishing. */

Solution #5: Contact Your Hosting Provider

If you’ve tried several solutions and can’t seem to figure out what’s wrong or how to solve it, it may help to contact your hosting provider. They may have experience with this issue and take the appropriate steps to solve it.

Additionally, some hosting providers have restrictions that prevent you from making changes, such as increasing your PHP memory limit, especially if you’re using a shared hosting plan, which usually has more limited resources.

Contacting your web host and explaining the problem may get them to scan your site and look for potential solutions.

Access Your WordPress Admin Dashboard Again With Recovery Mode

Fatal errors can prevent you from accessing your WordPress admin dashboard and lock you out of your own site. The best way to access your admin dashboard after a fatal error is Recovery Mode, a built-in feature that allows you to bypass issues like plugin and theme incompatibilities to restore your site to its normal functionality.

We explored 2 methods for accessing your WordPress admin through Recovery Mode and 5 solutions to the fatal error. Hopefully, one of them will help you bring your site back to normal.

If you found this post useful, read our blog and resources for more insights and guides!