Quick answer
A critical error in WordPress is most often caused by an incompatible plugin, theme, or corrupted file. The solution is to enable WP_DEBUG, find the culprit and disable it, then get the site back up.
How to recognize the problem
- The site shows the message "There has been a critical error on this website"
- The admin dashboard is unavailable or shows white screens
- The error appeared after updating a plugin or theme
- An email notification about a critical error was received
- The site works, but some pages show an error
Most common causes
Incompatible plugin
A plugin that is not updated or is incompatible with the new WordPress version can cause a fatal error.
Corrupted theme
An error in the theme code or incompatibility with a plugin often leads to a critical error.
Corrupted core files
A failed update or interrupted file transfer can damage the WordPress core.
Insufficient memory
If the PHP memory limit is not sufficient, WordPress may report a critical error.
PHP version conflict
A theme or plugin may be incompatible with the PHP version on the server.
Step-by-step fix
- 1
Enable error display
Open
wp-config.phpand temporarily setdefine('WP_DEBUG', true);,define('WP_DEBUG_LOG', true);anddefine('WP_DEBUG_DISPLAY', false);. Errors will be logged inwp-content/debug.log. Do not leave these changes permanently. - 2
Review debug.log
Open
wp-content/debug.logand find the last fatal error. It will show which file and line caused the problem, which will point you to the plugin or theme. - 3
Disable all plugins
If you cannot access the admin dashboard, via FTP or file manager rename the
wp-content/pluginsfolder towp-content/plugins_off. Then log in to the admin dashboard. If you can log in, the problem is in a plugin: rename the folder back and immediately disable all plugins in thePluginsmenu. If the error returns before you can do that, via FTP rename the folders of individual plugins. - 4
Find the problematic plugin
Activate plugins one by one and check the site. When the error reappears, the last activated plugin is the culprit. Disable it and replace it with an up-to-date version; if you delete it, make a backup first.
- 5
Check the theme
If the error persists even when all plugins are disabled, rename the active theme folder inside
wp-content/themes(for example totheme_off). WordPress will usually switch to the default theme. If the site works, contact the theme author or replace it. - 6
Increase PHP memory
In
wp-config.phpadddefine('WP_MEMORY_LIMIT', '256M');. If necessary, ask hosting support to increasememory_limitto 256M or more. - 7
Check PHP version
In the admin dashboard go to
Tools > Site Health > Info, in theServersection, and check the PHP version. If it is older than 8.2, ask hosting to update it, but make a backup first. - 8
Restore from backup
If nothing helps, restore the site from the latest backup. Restoring will overwrite the current state, so first make a copy of the current site if possible. Use the backup you made before changes or the one kept by your hosting.
- 9
Disable debug mode
When the site is stable, in
wp-config.phpsetdefine('WP_DEBUG', false);and remove the other debug lines. Deletedebug.logif not needed.
If nothing helps
If you have disabled all plugins and the theme and the error still persists, the problem is likely in the WordPress core or on the server. Before deleting files, make sure to back up the site and database. Download a fresh version of WordPress, delete the wp-admin and wp-includes folders (do not touch wp-content and wp-config.php) and upload the new files via FTP. If that does not help either, contact hosting support and ask for access to the PHP error log on the server.
How to prevent it
- Regularly update WordPress, themes, and plugins
- Use only reputable plugins and themes
- Make a backup before every update
- Monitor PHP version and hosting requirements
When to call a professional
If you cannot access files or the database, or the error recurs even after restoring a backup, contact IT support to avoid data loss.
Website development · Fast, SEO-ready, multilingual websitesFAQ
How do I know which plugin is causing the critical error?
Enable WP_DEBUG and review `debug.log`, or disable all plugins and then activate them one by one. The last activated plugin before the error appears is the most likely culprit.
Can I fix the site without admin access?
Yes, via FTP or the file manager on your hosting. You can rename the plugin or theme folder to disable the problematic component.
What does the message "There has been a critical error on this website" mean?
It is a WordPress message that appears when PHP encounters a fatal error. Details may be hidden from visitors, but they are logged in the log file if WP_DEBUG is enabled.