When you encounter a critical error message like “There has been a critical error on this website” in WordPress, it means that something has gone wrong that is preventing WordPress from functioning properly. In this article, you will learn how to fix WordPress critical error. The error usually presents like this “There has been a critical error on this website. Learn more about troubleshooting WordPress.” Here’s a step-by-step guide to diagnose and fix the issue:
- Enable Debugging: If you have access to your WordPress files, you can enable debugging to get more information about the error. In your wp-config.php file, set WP_DEBUG to true:
define( 'WP_DEBUG', true );
If the code is not already there, you can copy and paste it in just above /*That’s all, sttop editing! Happy Publishing.*/. Visit the site again, and this will display error messages on your site, which can help identify the problem. You can read more about debugging in WordPress. - Check Error Logs: If you have access to server error logs (usually available through your hosting control panel or via FTP), check for any recent PHP or WordPress-related error logs. These logs may provide more specific information about the error. On Plesk, you can find error logs by clicking the “Logs” icon while you are on your website page.
- Check Plugins and Themes: Deactivate all plugins and switch to a default WordPress theme (like Twenty Twenty-Three). Sometimes, conflicts between plugins or themes can cause critical errors. If the error goes away after deactivating plugins or switching themes, you can reactivate them one by one to identify the problematic one. If you cannot access the WordPress admin dashboard, just go to your control panel file manager of your website, open the wp-content folder, then open the themes folder, then simply move the theme folder (the folder that bears the exact theme name to a different folder) to a new folder. You can also deactivate plugins manually by going to the plugins folder and move them to a different custom folder. Please check this link for more details on how to deactivate plugins manually.
- Check for Recent Changes: Think about any recent changes you’ve made to your site, such as installing new plugins, updating themes or plugins, or modifying code. Reverting recent changes can sometimes resolve the issue.
- Increase Memory Limit: Sometimes, critical errors occur due to insufficient memory. You can try increasing the PHP memory limit by adding the following line to your
wp-config.php
file:define( 'WP_MEMORY_LIMIT', '256M' );
Adjust the memory limit value as needed. If on our Plesk server, you will need to contact us to do that for you. - Reinstall WordPress Core Files: If none of the above steps resolve the issue, you may need to reinstall WordPress core files. Download the latest version of WordPress from wordpress.org and replace all files and folders except the
wp-content
folder and thewp-config.php
file. You can also do that in WordPress Toolkit when you click on “Check WordPress Integrity”. - Contact Support: If you’re still unable to resolve the issue, consider reaching out by opening a support ticket in your Ovation Hall account.
By following these steps, you should be able to diagnose and fix the critical error on your WordPress website.
Leave A Comment?