The "There has been a critical error on this website" message in WordPress typically occurs due to:
- A plugin issue.
- A theme issue.
- A PHP error caused by incompatibility between PHP version, plugins, or theme.
- Incorrect
.htaccess
orwp-config.php
configuration.
Steps to Resolve the Issue
Follow these steps to identify and fix the problem:
1. Enable Debugging
- Access the File Manager on your hosting server (or via FTP).
- Edit the
wp-config.php
file. - Locate the line: Change it to:
- Save the file and reload the site. Errors will be logged in
/wp-content/debug.log
.
2. Deactivate Plugins
- Navigate to
/wp-content/plugins
in the File Manager. - Rename the
plugins
folder toplugins_backup
. - Check if the site works. If it does, the issue lies in one of the plugins.
- Rename the folder back to
plugins
and deactivate plugins one by one until you find the problematic one.
3. Switch Themes
- If the issue persists, navigate to
/wp-content/themes
and rename the folder of the active theme. - WordPress will revert to a default theme (e.g.,
Twenty Twenty-Two
).
4. Check PHP Version
- Ensure your PHP version is compatible with your WordPress version, plugins, and theme.
- Update PHP through Plesk or cPanel.
5. Restore the .htaccess
File
- Go to your WordPress root directory and create a new
.htaccess
file with the following content:
6. Reinstall Core WordPress Files
- Download the latest WordPress version from wordpress.org.
- Upload the files (except the
wp-content
folder andwp-config.php
) to your site. - Overwrite the existing files.
7. Contact Technical Support
- Our technical support department will look into the problem in detail. Don't worry, your current request will be reviewed by our team as soon as possible.