How to Access WordPress Admin with a Critical Error Warning: Fix Guide

Imagine this: You wake up in the morning, grab a cup of coffee, and go to log in to your WordPress website to check on things. But instead of the familiar admin dashboard, you see a white screen with a chilling message:

“There has been a critical error on your website.”

This is one of the most alarming moments a WordPress website owner can experience. Your heart sinks. Your mind races. Is the site gone forever? Did something get hacked? Will visitors see this? Can I fix it?

Take a deep breath. The good news is that this error is almost always fixable. Even better, you do not need to be a developer or have any coding experience to resolve most cases. This guide is written specifically to walk you through the entire process in plain, simple English – from understanding what the error means to accessing your admin panel again and permanently fixing the root cause.

What Is the WordPress Critical Error?

Before you can fix something, it helps to understand what it is. The “There has been a critical error on your website” message was introduced in WordPress version 5.2 as a safety feature. Before this update, when WordPress encountered a serious PHP error – a problem in the underlying code – the entire site would often go completely blank. This became known as the WordPress White Screen of Death.

Starting with version 5.2, WordPress introduced a Recovery Mode system. Instead of showing nothing at all, WordPress now catches fatal PHP errors and shows a readable message. It also sends an email to the site administrator with a special recovery link that can be used to enter the admin area even when the site is broken.

In technical terms, this error means that something in your WordPress installation has caused a PHP fatal error. PHP is the programming language that powers WordPress. When a piece of code fails badly enough that PHP cannot continue executing it, WordPress catches the failure and displays this warning instead of crashing silently.

Why Does This Error Happen?

There are several common causes behind the WordPress critical error. Understanding which one applies to your situation will help you fix it faster:

  • A plugin update that introduced buggy or incompatible code
  • A theme that is not compatible with your current version of WordPress
  • A manually edited PHP file, such as functions.php, that contains a syntax error
  • WordPress core files that became corrupted during a failed update
  • A conflict between two plugins that cannot coexist
  • Running out of PHP memory on your hosting server

First Things First: Check Your Email

When WordPress detects a critical error, it automatically sends an email to the admin email address associated with your WordPress account. This email is incredibly important because it usually contains two things:

  1. A description or clue about what caused the error
  2. A special Recovery Mode link that allows you to log into WordPress even while the error is active

The recovery link looks something like this:

yourwebsite.com/wp-login.php?action=enter_recovery_mode&rm_token=XXXXXX

Important note: This recovery link expires after one hour and can only be used once. So act quickly if you find it in your inbox.

When you click the recovery link, you will be taken to the WordPress login screen. Log in normally with your username and password. Once logged in, WordPress will enter Recovery Mode, which temporarily disables the problematic plugin or theme so you can access your dashboard safely.

Inside Recovery Mode, look for a notice at the top of the screen that says which plugin or theme caused the error. You can then deactivate it directly from there. Once you exit Recovery Mode, your site should load normally.

What If You Did Not Receive the Email?

It is quite common for the recovery email to go missing. Here are the most likely reasons:

  • The email landed in your spam or junk folder – always check there first
  • Your hosting server has email delivery issues or WordPress email functionality is broken
  • The admin email address on your WordPress account is outdated or incorrect
  • The error was so severe that WordPress could not even send the email

If you fall into this situation, do not worry. There are multiple other methods to access your WordPress admin, and we will walk through all of them in the following sections.

Method 1: Access WP-Admin by Deactivating Plugins via FTP

This is one of the most reliable methods for fixing the critical error when you cannot log into WordPress normally. It requires accessing your website’s file system using FTP (File Transfer Protocol) or SFTP. Do not let the technical terminology frighten you – the steps are straightforward once you have the right tool.

Step 1 – Get an FTP Client

Download and install FileZilla, which is free and very easy to use. You can find it at filezilla-project.org. Alternatively, many hosting control panels (like cPanel) have a built-in File Manager that works similarly.

Step 2 – Connect to Your Server

You will need your FTP credentials, which are available in your hosting account’s dashboard or welcome email. These typically include:

  • FTP Host (usually your domain name or an IP address)
  • FTP Username
  • FTP Password
  • FTP Port (usually 21 for FTP or 22 for SFTP)

Step 3 – Rename the Plugins Folder

Once connected, navigate to the following folder path on your server:

public_html > wp-content > plugins

Right-click on the folder named “plugins” and select Rename. Change the name to something like “plugins_disabled” or “plugins_backup”. This tells WordPress that the plugins folder does not exist, so it disables all plugins at once automatically.

Now try loading your website or visiting yoursite.com/wp-admin. If the critical error was caused by a plugin, your site should now be accessible. WordPress will also show you a notice that some plugins were deactivated.

Step 4 – Find the Problematic Plugin

Go back to FTP and rename the plugins folder back to its original name “plugins”. Then, go inside the folder. You will see a subfolder for each individual plugin you had installed. The goal now is to find which plugin is causing the issue.

Rename each plugin subfolder one at a time (adding “_disabled” to the end of the folder name), then refresh your site after each change. When renaming a particular plugin folder causes the critical error to disappear, you have found the culprit. Delete that plugin or contact its developer for a fix.

Method 2: Deactivate Plugins via phpMyAdmin

If FTP is not available or you are more comfortable working through your hosting panel, phpMyAdmin is another solid option. phpMyAdmin is a database management tool that lets you view and edit your WordPress database directly.

To use this method, log into your hosting control panel (such as cPanel, Plesk, or DirectAdmin), and look for the phpMyAdmin option. Click it to open the tool.

How to Deactivate All Plugins Using the Database

  1. In phpMyAdmin, click on your WordPress database from the list on the left side.
  2. Look for a table named wp_options (the prefix might differ, such as mywp_options or site_options depending on your setup).
  3. Click on Search (not Browse) and look for the row where option_name equals “active_plugins”.
  4. Click Edit on that row.
  5. In the option_value field, delete all of the existing content and replace it with: a:0:{}
  6. Click the Go button to save the change.

The value a:0:{} is a PHP serialized empty array. This tells WordPress that no plugins are active. Try accessing your WordPress admin now – it should work. Then you can reactivate your plugins one by one from the dashboard to identify which one caused the error.

Method 3: Switch or Disable the Active Theme via FTP

If deactivating plugins did not resolve the critical error, the problem may lie in your active WordPress theme. Theme issues, especially in the functions.php file, are another very common cause of fatal PHP errors.

Using FTP, navigate to:

public_html > wp-content > themes

Here you will see a folder for each installed theme. Find the folder for your currently active theme and rename it – for example, if your theme is called “mytheme”, rename it to “mytheme_disabled”.

When WordPress cannot find the active theme, it automatically falls back to a default WordPress theme (such as Twenty Twenty-Three or Twenty Twenty-Four). This means your site will suddenly use a basic, plain-looking theme, but it will be functional again. Try accessing your admin panel – it should now work.

Once logged in, go to Appearance > Themes and activate a working theme. Then investigate what was wrong with your original theme – it may need an update from the theme developer, or you may have accidentally introduced a code error.

What If the Theme Has a Code Error in functions.php?

Sometimes, users edit the functions.php file of their theme directly and introduce a syntax error – like a missing semicolon, an unclosed bracket, or a copy-paste mistake. This is one of the most frequent causes of the critical error.

To fix this, navigate via FTP to your theme folder and open the functions.php file. Look for any recently added code and check for obvious syntax mistakes. If you are not confident identifying the error, you can delete the recently added code entirely and save the file. That alone is often enough to restore the site.

Method 4: Enable WordPress Debug Mode

When the critical error message does not tell you exactly what went wrong, WordPress debug mode can reveal the specific file and line number causing the problem. This information is invaluable for tracking down and fixing the root cause.

To enable debug mode, you need to edit a file called wp-config.php, which lives in the root directory of your WordPress installation. Open it via FTP or your hosting File Manager.

Find this line:

define( ‘WP_DEBUG’, false );

And replace it with these three lines:

define( ‘WP_DEBUG’, true );

define( ‘WP_DEBUG_LOG’, true );

define( ‘WP_DEBUG_DISPLAY’, false );

Save the file. Now WordPress will write detailed error messages to a log file located at:

public_html > wp-content > debug.log

Open this log file using a text editor and look at the errors listed. You will typically see something like “Fatal error: … in /home/user/public_html/wp-content/plugins/some-plugin/some-file.php on line 47”. This tells you exactly which file and which line is causing the problem.

Important: Always remember to turn debug mode OFF after you fix the issue. Leaving WP_DEBUG_DISPLAY set to true could expose sensitive information to visitors on a live website. Change all three lines back to their default state once you are done troubleshooting.

Method 5: Restore a Backup

If you have a recent backup of your website, restoring it may be the fastest and easiest path back to a working site. Most quality hosting providers offer automated daily backups, and many WordPress backup plugins create scheduled backups as well.

Log in to your hosting account and look for a Backup or Restore option in your control panel. Popular hosts like SiteGround, Bluehost, WP Engine, and Kinsta all offer one-click restore features from their dashboards. Select a backup from a date before the error started and restore it.

Keep in mind that restoring a backup will roll back any changes made between the backup date and now – including new posts, comments, orders, or user registrations. Always weigh this before going ahead. For many site owners, especially those running blogs or informational websites that are not updated frequently, backup restoration is the cleanest and quickest fix available.

Method 6: Increase PHP Memory Limit

Sometimes the critical error is triggered not by broken code, but by PHP running out of memory while trying to execute a script. This is common on shared hosting plans with low default memory limits, or when you install memory-heavy plugins.

To increase PHP memory, open your wp-config.php file via FTP and add the following line just above the line that reads “That’s all, stop editing!”:

define( ‘WP_MEMORY_LIMIT’, ‘256M’ );

Save the file and reload your site. If memory was the issue, the critical error should now disappear. If your hosting plan does not allow higher memory allocation, you may need to contact your host or upgrade your plan.

Method 7: Re-upload WordPress Core Files

In some cases, the critical error is caused by corrupted WordPress core files – the essential files that make WordPress itself run. This can happen during a failed update, a server glitch, or even a malware infection.

To fix this without losing any of your content or settings, you can re-upload a fresh copy of the WordPress core files while leaving the wp-content folder and wp-config.php file untouched.

How to Re-upload Core Files Safely

  1. Visit wordpress.org and download the latest version of WordPress as a .zip file.
  2. Extract the zip file on your computer. You will see a folder called “wordpress”.
  3. Inside this folder, delete the wp-content folder – you do NOT want to upload this, as it would overwrite your themes, plugins, and uploads.
  4. Also delete the wp-config-sample.php file – again, you do not want to overwrite your live config.
  5. Using FTP, upload everything that remains to your public_html folder, overwriting the files on the server when prompted.
  6. Reload your site and try accessing wp-admin again.

How to Prevent the Critical Error from Happening Again

Fixing the problem once is great, but making sure it does not happen again is even better. Here are the best practices every WordPress site owner should follow to prevent future critical errors:

Always Back Up Before Updating

Before you update a plugin, theme, or WordPress itself, create a full backup of your site. This takes only a few minutes but can save you hours of work if something goes wrong. Free plugins like UpdraftPlus or Duplicator make this very easy.

Use a Staging Environment for Testing

A staging site is a private copy of your website where you can test updates and changes before pushing them to the live site. Many managed WordPress hosts like WP Engine, Kinsta, and SiteGround offer built-in staging features. Always test major updates on staging first.

Keep WordPress, Themes, and Plugins Updated

Outdated plugins and themes are one of the top causes of errors and security vulnerabilities. Check for updates regularly from your WordPress dashboard by going to Dashboard > Updates. Enable automatic updates for minor WordPress core versions if your host supports it.

Avoid Editing PHP Files Directly in Production

Editing code directly on a live website is risky. Even a small typo in a PHP file can cause a critical error. If you need to add custom code to functions.php or other PHP files, test the changes on a local development environment first, or use a code snippets plugin that safely validates your PHP code before saving it.

Use Quality, Actively Maintained Plugins

Not all plugins are created equal. When choosing a plugin, look for ones that have been updated recently (within the past few months), have a high number of active installations, and positive reviews. Avoid installing many plugins unnecessarily – each additional plugin is a potential source of conflict and error.

Set Up Uptime Monitoring

Uptime monitoring tools like UptimeRobot or Better Uptime check your website every few minutes and notify you by email or SMS if it goes down. This way, you find out immediately when something goes wrong – rather than discovering it hours later.

Troubleshooting Specific Scenarios

Critical Error After Installing a New Plugin

If the error appeared immediately after installing a plugin, that plugin is almost certainly the cause. Use FTP to rename its folder inside wp-content/plugins or use phpMyAdmin to clear the active_plugins option as described earlier. Once back in your admin panel, delete the plugin and look for an alternative.

Critical Error After a WordPress Update

Occasionally, a WordPress update can conflict with older plugins or themes. In this case, deactivate all plugins and try switching to a default theme. Then reactivate plugins one by one. The plugin that triggers the error after reactivation is the incompatible one. Contact its developer and report the issue.

Critical Error on a Newly Created WordPress Site

If you encounter this error on a brand new site that was working just moments ago, the issue is likely in a configuration file. Double-check your wp-config.php for any typos – especially in the database connection details. Also confirm that the database name, username, password, and host are all correct.

Critical Error After Editing Code

If you or a developer recently edited PHP code and triggered this error, use FTP to go directly to the edited file and undo your changes. If you no longer have a copy of the original, you can download a fresh version of the plugin or theme from WordPress.org or the theme vendor, extract just the affected PHP file, and upload it to replace the broken version.

Conclusion

The WordPress critical error warning can feel terrifying in the moment, but as this guide demonstrates, it is almost always fixable – and in many cases, fixable without any prior technical experience. Whether you use the Recovery Mode email, FTP file management, phpMyAdmin, debug logs, or a backup restoration, you now have a complete toolkit at your disposal.

The key to handling this error confidently is staying calm, working systematically through the methods, and always noting what changed right before the error appeared. In most cases, the cause is straightforward – a bad plugin, a theme conflict, or a minor code mistake – and the fix is correspondingly simple once you know where to look.

Going forward, make regular backups part of your routine, keep everything updated, and test changes on a staging environment whenever possible. A few good habits like these will dramatically reduce the chance of ever seeing that critical error message again.

Your WordPress site is resilient. With the knowledge you have gained from this guide, so are you.

About the Author

Jay Patel is the Founder of XSquareSEO, a full-service SEO agency with experience in on-page SEOeCommerce SEOlink buildingtechnical SEOSaaS SEO, and local SEO. For more information, feel free to contact us

Explore More Guides

Nonprofit WordPress Site
Change WP Profile Gravatar
Copy HTML Code WordPress
Half Size Cards WordPress
Deindex WP Tag Pages
Disable Auto Excerpt WP
Disable WP Cron Jobs
WP Tags Social Media
Duplicate WP Hostinger
FAQ Schema Elementor WP

Scroll to Top