Overview
The WordPress "There has been a critical error on this website" message (and its older cousin, the blank white screen known as the White Screen of Death) is one of the most common issues WordPress site owners encounter. It's alarming, but it's almost always fixable without needing server-side intervention.
This article walks through the common causes and step-by-step fixes you can perform yourself using the tools in cPanel or DirectAdmin.
What the Error Looks Like
- Modern WordPress (5.2+): A plain page saying "There has been a critical error on this website. Please check your site admin email inbox for instructions."
- Older versions or severe errors: A completely blank white page with no text at all.
- In the admin area: You may see the critical error only on the frontend but still be able to log in at
/wp-admin/, or vice versa.
WordPress sends a detailed email to the site admin address stored in Settings → General. This email often contains the exact file and line number causing the error — check this inbox first.
The Three Most Common Causes
- PHP memory limit exhaustion — The site has outgrown its allocated memory, often after adding plugins or growing content.
- Plugin or theme conflict — A recently updated, installed, or activated plugin/theme is incompatible or buggy.
- PHP version incompatibility — The site is running on a PHP version too old (or too new) for its plugins/theme.
We'll cover how to diagnose and resolve each.
Step 1: Check the Error Logs
Before making changes, find out what's actually failing.
On cPanel
- Log in to cPanel.
- In the search bar, type Errors and click the Errors icon.
- This shows the most recent entries from the server error log.
- Look for lines mentioning PHP errors, especially
Fatal error, Allowed memory size, or references to files inside /wp-content/plugins/ or /wp-content/themes/.
You can also check:
- Metrics → Errors — Same data, sometimes more entries.
- File Manager — Navigate to your site root and look for a
error_log file, which PHP writes to directly.
On DirectAdmin
- Log in to DirectAdmin.
- Go to Domain Setup and click your domain.
- Look for Site Summary / Statistics / Logs or Error Log.
- Recent PHP errors will be listed with timestamps.
Alternatively, use File Manager to browse to your site's root and open any error_log file.
What to Look For
Fatal error: Allowed memory size of X bytes exhausted — Memory issue (go to Step 2).
Fatal error: Uncaught Error: followed by a plugin or theme path — Plugin/theme issue (Step 3).
Parse error: syntax error — Usually PHP version mismatch (Step 4).
- Errors mentioning
mysqli or database connection — Different issue; contact support.
Step 2: Increase the PHP Memory Limit
If the error log mentions memory exhaustion, the fix is straightforward.
Method A: Edit wp-config.php (Recommended)
- Open File Manager in cPanel or DirectAdmin.
- Navigate to your site's root folder (usually
public_html/ or domains/yourdomain.com/public_html/).
- Find
wp-config.php, right-click, and choose Edit.
- Add this line just above the
/* That's all, stop editing! */ comment:
define('WP_MEMORY_LIMIT', '256M');
- Save the file and reload your site.
If 256M isn't enough, try 512M.
Method B: Increase PHP Memory via Control Panel
cPanel (MultiPHP INI Editor):
- In cPanel, search for MultiPHP INI Editor.
- Choose your domain from the dropdown.
- Find
memory_limit and increase it (e.g., from 128M to 256M or 512M).
- Click Apply.
DirectAdmin:
- Go to Account Manager → Select PHP Version (or PHP Selector depending on your setup).
- Click Options or PHP Settings.
- Find
memory_limit and change the value.
- Save.
Method C: Create/Edit a php.ini File
- In File Manager, go to your site's root folder.
- If a
php.ini file exists, edit it. If not, create one.
- Add or update:
- Save the file.
After changing the memory limit by any method, reload the site. If the error is gone, you're done. If not, move on to Step 3.
Step 3: Disable Plugins to Find the Conflict
If a specific plugin is listed in the error log, or if the error started right after updating or installing a plugin, this is almost certainly the cause.
If You Can Still Access wp-admin
- Log in at
yourdomain.com/wp-admin.
- Go to Plugins → Installed Plugins.
- Select all plugins, choose Deactivate from the bulk actions dropdown, and apply.
- Reload your site. If the error is gone, reactivate plugins one by one, testing after each, until you find the culprit.
If You're Locked Out of wp-admin
Disable plugins via File Manager:
- Open File Manager.
- Navigate to
public_html/wp-content/.
- Find the
plugins folder.
- Right-click and rename it to
plugins-disabled.
- Reload your site. All plugins are now deactivated.
- Try logging into wp-admin. If successful, rename the folder back to
plugins — all your plugins will be listed as deactivated but their data is preserved.
- Reactivate plugins one at a time to identify the faulty one.
If a Specific Plugin Is the Culprit
- Once identified, in File Manager navigate into
wp-content/plugins/.
- Rename the folder of the specific plugin to disable just that one (e.g., rename
bad-plugin to bad-plugin-disabled).
- Log in to wp-admin and either delete the plugin, find a replacement, or check the plugin's support page for a fix.
Step 4: Check the Theme
If disabling all plugins didn't help, test the theme.
Via wp-admin
- Go to Appearance → Themes.
- Activate a default WordPress theme like Twenty Twenty-Four.
- Test the site.
Via File Manager (if locked out)
- Navigate to
wp-content/themes/.
- Rename the folder of your active theme (e.g., rename
my-theme to my-theme-disabled).
- WordPress will automatically fall back to a default theme if one is installed.
- If no default theme exists, download one from wordpress.org, upload, and extract it into
wp-content/themes/.
If the error clears with a default theme active, the issue is your theme. Contact the theme developer or consider rolling back to a previous version (often available via a purchased download account or GitHub repository).
Step 5: Check PHP Version Compatibility
WordPress core requires PHP 7.4 or higher (8.0+ recommended as of 2024). But many older plugins and themes haven't been updated for PHP 8.x, and new ones may not work on older PHP.
Change PHP Version in cPanel
- In cPanel, search for MultiPHP Manager.
- Select your domain.
- Choose a different PHP version from the dropdown (try 8.1 if currently on 8.2, or 7.4 if currently on 8.x).
- Click Apply.
- Test the site.
Change PHP Version in DirectAdmin
- Go to Account Manager → Select PHP Version (or Domain Setup → your domain → PHP Version).
- Choose a different version.
- Save.
General guidance:
- If on PHP 8.x and seeing errors, try 7.4 temporarily to confirm the issue is version-related.
- Don't stay on PHP 7.4 long-term — it's unsupported and a security risk.
- If an older plugin breaks on PHP 8.x, the real fix is updating or replacing that plugin.
Step 6: Enable WP_DEBUG for More Information
If the error logs aren't clear, enable WordPress debug mode to get more detail.
- Open
wp-config.php in File Manager.
- Find the line:
define('WP_DEBUG', false);
- Replace it with:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
- Save.
This writes errors to wp-content/debug.log without displaying them to visitors. Reload your site, then open that file via File Manager to read detailed error information.
Important: Turn debug mode off when you're done by setting WP_DEBUG back to false. Leaving it on in production is a security risk.
Step 7: Other Common Fixes
Corrupted Core Files
If errors reference files in /wp-includes/ or /wp-admin/, core files may be corrupted.
- Download a fresh copy of WordPress from wordpress.org.
- Extract the zip locally.
- Via File Manager or FTP, upload the
wp-admin and wp-includes folders, overwriting existing files. Do not overwrite wp-content/ or wp-config.php.
- Test the site.
.htaccess Issues
- In File Manager, find
.htaccess in your site root (enable "Show Hidden Files" in File Manager settings if needed).
- Rename it to
.htaccess-backup.
- Log in to wp-admin and go to Settings → Permalinks.
- Click Save Changes without changing anything. WordPress will regenerate a clean
.htaccess.
Out of Disk Space
- Check your cPanel or DirectAdmin dashboard for disk usage.
- If you're at or near your quota, WordPress can't write to the database or create temporary files, causing critical errors.
- Clear old backups, unused plugins, and large log files, or upgrade your hosting plan.
Prevention Tips
- Always back up before updating. Most critical errors happen during or after an update.
- Update plugins/themes one at a time. Makes it easy to identify which update caused an issue.
- Keep PHP up to date, but only after confirming your plugins and theme support the new version.
- Remove plugins you're not using rather than just deactivating them.
- Monitor the admin email address stored in WordPress — critical error notifications go there.
When to Contact Support
Most critical errors can be resolved with the steps above. Open a ticket if:
- You've tried the steps and the error persists with a clear message you don't recognise.
- You suspect a server-level issue (e.g., errors mentioning MySQL connection failures, or the site works on one page but not others with no plugin/theme involvement).
- You need help restoring from a backup.
- You're locked out entirely and can't access File Manager, cPanel, or DirectAdmin.
When opening a ticket, please include:
- The exact error message (and a screenshot if possible).
- What was changed immediately before the error appeared (plugin update, theme change, PHP version change).
- Anything you've already tried from this guide.
- The contents of
wp-content/debug.log if you enabled debug mode.
This helps us jump straight to the root cause instead of duplicating troubleshooting you've already done.