The error message “There has been a critical error on your website” is one of the most common and frustrating messages in WordPress. It indicates that the website is no longer functioning correctly, and in most cases, neither the frontend nor the backend is accessible. In this article, we explain the possible causes and provide concrete steps to resolve the issue.
What Does the Error Message Mean?
Since WordPress 5.2, this message appears when a serious error prevents the website from functioning. WordPress also sends an email to the administrator containing more detailed information about the error, including the affected plugin or theme.
Important: If you do not have access to your WordPress dashboard, you should analyze the error message via email or directly on the server.
Common Causes of the Error Message
There are many possible reasons for this critical error. The most common ones include:
1. Plugin or Theme Conflicts
Description:
Incompatible or faulty plugins and themes are the main causes of critical errors. A recent update or the installation of a new plugin can trigger the problem.
Solution:
- Deactivate Plugins: If you have access to the admin area, deactivate plugins one by one via “Plugins > Installed Plugins.”
- If you cannot access WordPress, disable plugins via FTP:
- Connect to your server via FTP (e.g., with FileZilla).
- Navigate to
/wp-content/plugins/
and rename the plugins folder (e.g.,plugins_alt
). - Check if the website works again.
- Reactivate plugins one by one to identify the culprit.
- Switch Theme: If the problem persists, activate a default theme:
- Navigate to
/wp-content/themes/
via FTP. - Rename the folder of the active theme (e.g.,
my-theme_alt
). - WordPress will automatically activate a default theme like “Twenty Twenty-Three.”
- Navigate to
2. Errors in functions.php
or Other PHP Files
Description:
If you recently modified the functions.php
file or other WordPress files, a syntax error or faulty code could break the site.
Solution:
- Connect via FTP and navigate to the active theme folder (
/wp-content/themes/your-theme/
). - Open
functions.php
and check for faulty code. - If unsure, restore a previous version of the file.
3. Insufficient PHP Memory Limit
Description:
WordPress requires a certain amount of memory. If the limit is exceeded, a critical error may occur.
Solution:
Increase the PHP memory limit by adding the following line to wp-config.php
(located in the main WordPress directory):
define('WP_MEMORY_LIMIT', '256M');
If the error persists, you may need to increase the memory limit in php.ini
or via .htaccess
.
4. Outdated WordPress or PHP Version
Description:
An outdated WordPress or PHP version may be incompatible with modern plugins or themes, causing errors.
Solution:
- Check PHP Version: Log into your hosting control panel and ensure at least PHP 8.0 is running.
- Update WordPress: If you still have dashboard access, update WordPress via “Dashboard > Updates.”
If no access is available, download the latest WordPress version from wordpress.org and replace the files in the /wp-admin/
and /wp-includes/
folders via FTP.
5. Database Errors or Corrupt Tables
Description:
If database tables are corrupted or the database connection fails, WordPress may display the critical error message.
Solution:
- Open
wp-config.php
and add the following line:
define('WP_ALLOW_REPAIR', true);
- Then visit
https://yourdomain.com/wp-admin/maint/repair.php
and follow the instructions to repair the database. - Remove the line from
wp-config.php
after the repair.
Step-by-Step Troubleshooting Guide
If you cannot immediately identify the cause of the error, follow these steps:
Conclusion: Fixing Critical WordPress Errors Efficiently
The message “There has been a critical error on your website” can have numerous causes. The most common ones include plugin or theme conflicts, faulty PHP code changes, insufficient PHP memory limits, or database issues. By following targeted steps – from deactivating plugins to repairing the database – the root cause can often be quickly identified and resolved.
To prevent future errors, we recommend:
✅ Regular updates of WordPress, plugins, and themes
✅ Daily backups using a reliable backup plugin
✅ Using a secure and up-to-date PHP stack
✅ Caution when modifying functions.php
or other critical files
If the problem persists, restoring a backup or contacting hosting support can help.
Image credits:
Photo courtesy of Gratisography
Photo Diagramm of whimsical