Sometimes, when you open your WordPress site, you see a scary message that says, “There has been a critical error on this website.” You may also see “Fatal error” on a white screen. Your site may stop working, and you may be unable to access your admin dashboard.
Don’t panic. This is a common problem. You can fix it and get back into your WordPress admin panel. In this guide, I’ll show you simple steps to access your WordPress admin even after a fatal error.
What Causes a Fatal Error in WordPress?
A fatal error means something in the website code has gone wrong. It stops WordPress from loading correctly. Here are common causes:
- A bad plugin
- A broken theme
- A code change gone wrong
- Running out of memory
- A missing or damaged file
Now, let’s fix it and reaccess the admin dashboard.
Step 1: Enable Debug Mode
You can use debug mode to see what’s causing the error.
Steps to Turn On Debug Mode:
- Open your hosting panel (like cPanel or File Manager)
- Go to the folder named public_html or where WordPress is installed.
- Find the file called wp-config.php
- Right-click and click Edit.
- Look for this line:
define( ‘WP_DEBUG’, false );
- Change it to:
define( ‘WP_DEBUG’, true );
define( ‘WP_DEBUG_LOG’, true );
define( ‘WP_DEBUG_DISPLAY’, false );
- Save the file
Now, WordPress will log the error details in a file. You can find the file here:
/wp-content/debug.log
Open it to see what is causing the error.
Step 2: Disable All Plugins
Most of the time, a plugin is the problem. You need to disable plugins to check if that solves it.
- Open File Manager or connect using FTP
- Go to the folder: wp-content/
- Find the folder named plugins.
- Rename it to something like plugins_old
WordPress will now stop all plugins. Try revisiting your site and admin area. If it works, then you know one of the plugins caused the problem.
Step 3: Rename the Active Theme
Sometimes, the active theme creates an error. You can switch it off by renaming its folder.
Steps to Deactivate the Theme
- Go to wp-content/themes/
- Find the folder of your active theme.
- Rename it (for example: twentytwentyone-old)
WordPress will now try to use a default theme. If there is no default theme, upload one like Twenty-One to the folder and try again.
Step 4: Increase Memory Limit
Low memory can cause a fatal error. You can fix it by increasing the memory limit.
Steps to Increase Memory
- Go to wp-config.php
- Add this line just before “That’s all, stop editing!”
define(‘WP_MEMORY_LIMIT’, ‘256M’);
- Save the file
This change gives more memory to WordPress. Try opening your admin panel again.
Step 5: Check for Corrupted Core Files
A WordPress update gone wrong can damage core files. You can fix this by uploading fresh files.
- Go to wordpress.org and download the latest WordPress zip
- Unzip it on your computer.
- Open the folder and delete wp-content
- Upload all other files to your server using FTP or File Manager.
- Overwrite the old files.
This will fix any broken WordPress files without deleting your content.
Step 6: Restore a Backup
If nothing works, use a backup to bring the site back to normal.
- If your hosting offers daily backups, restore one from the day before the error.
- If you used a plugin like UpdraftPlus or All-in-One WP Migration, restore the backup.
Once restored, try logging into the admin panel.
Step 7: Use Recovery Mode Email
Sometimes, WordPress sends a recovery email when it hits a fatal error.
- Check your inbox for an email with the subject:
“Your Site is Experiencing a Technical Issue” - Open the email and click the unique login link
- This opens WordPress in recovery mode
- Deactivate the plugin or theme causing the issue
- Save changes and exit recovery mode
This is the easiest way to fix fatal errors, but it only works if WordPress can still send emails.