WordPress error - There has been a critical error on this website
- Linux Hosting
- WordPress Hosting
- Windows Hosting
- WordPress website (any version)
Issue
The website displays the following message:
On the website:
There has been a critical error on this website. Please check your site admin email inbox for instructions.
In the error email from WordPress (if enabled):
- “Your site is experiencing a technical issue.”
- “Error Details: An error of type E_ERROR was caused by…”
Cause
A PHP fatal error is preventing WordPress from loading. Common reasons include:
- A recently updated plugin or theme causing conflicts
- PHP version incompatibility
- Missing or corrupted core files
- Memory limit exhaustion
- Custom code errors in functions.php
- Disabled or corrupted PHP modules required by WordPress
Solution
1. Enable WordPress Recovery Mode (if available)
If WordPress sent an email:
- Open the link provided to access Recovery Mode.
- Deactivate the plugin/theme that WordPress reports as the cause.
2. Manually disable suspected plugins
If Recovery Mode is not available:
- Access the site via File Manager (cPanel or Plesk).
- Navigate to: wp-content/plugins
- Rename the suspected plugin folder name (e.g., elementor → elementor.disabled).
- Test the website again.
If unsure which plugin caused it, temporarily rename the entire plugins folder to disable all.
3. Switch to a default theme
Rename the active theme folder under: wp-content/themes
WordPress will automatically fall back to a default theme (e.g., Twenty Twenty-Five).
4. Check PHP version compatibility
Ensure your PHP version is supported by:
- WordPress core
- Themes
- Plugins
Try switching to an older or lower PHP version if the issue appeared after upgrading PHP.
Check these guides:
- How to change the PHP version of one domain or multiple domains in cPanel
- How to change PHP version for a domain in Plesk
5. Increase PHP memory limit
- Go to the file manager (cPanel or Plesk)
- Locate your WordPress site directory and edit the file named wp-config.php
- Find the line that says:
93 /* That's all, stop editing! Happy publishing. */ - Add the following line just above that comment:
92 define('WP_MEMORY_LIMIT', '256M'); - Save the file
- Reload the website to see if the error is resolved
6. Enable WordPress Debug Mode
This helps reveal the exact PHP error causing the critical error.
- Go to the file manager (cPanel or Plesk)
- Locate your WordPress site directory and edit the file named wp-config.php
- Look for this line:
89 define('WP_DEBUG', false); - Change the "false" to "true":
89 define('WP_DEBUG', true); - Save the file
- Reload the website to see the exact PHP error causing the critical error
Change this back to "false" after your troubleshooting.