So, your website is completely nuked and you have no idea why except for the heart-stopping error message “There has been a critical error on this website”? This error is a common issue that you, as a WordPress user, may encounter. It usually occurs when a plugin or theme is incompatible with the WordPress version, leading to a fatal error that prevents access to your website’s wp-admin login screen. This error can be frustrating as it locks you out of your website and prevents you from making necessary updates. However, there are several troubleshooting steps that you can follow to regain access to your WordPress website.
Step 1: Check for Plugin or Theme Compatibility
One of the most common causes of the “There has been a critical error on this website” error is a plugin or theme that is not compatible with the WordPress version. To troubleshoot this issue, you can start by deactivating all the plugins and themes on your website. You can do this by accessing your website’s file system using FTP or cPanel, navigating to the “wp-content” folder, and renaming the “plugins” and “themes” folders to something else, such as “plugins-deactivated” and “themes-deactivated”. This will automatically deactivate all plugins and themes on your website.
After deactivating the plugins and themes, try accessing your website’s wp-admin login screen again. If the error is resolved, then it’s likely that one of the plugins or themes was causing the issue. You can then reactivate the plugins and themes one by one, checking the wp-admin login screen after each activation, until you identify the plugin or theme that is causing the error. Once identified, you can either update the plugin or theme to its latest version or find an alternative plugin or theme that is compatible with your WordPress version.
Gone are the days of clicking “Update” and hoping for the best. Let Webidextrous manage your maintenance. We’ll give you back your time and peace of mind.
Step 2: Check WordPress Core Files
If deactivating plugins and themes does not resolve the error, the next step is to check the WordPress core files for any issues. Sometimes, a corrupted or missing core file can cause an error. To do this, you can download a fresh copy of WordPress from the official WordPress website and replace the existing core files on your website with a fresh copy. Make sure to back up your website files and database before making any changes.
To replace the core files, you can use FTP or cPanel to access your website’s file system, delete the existing WordPress core files (except for the “wp-content” folder and the “wp-config.php” file), and upload the fresh copy of WordPress files to your website. Once the files are uploaded, try accessing your website’s wp-admin login screen again to see if the error is resolved.
Step 3: Check the PHP Version and Memory Limit
Another possible cause of the error is an outdated or incompatible PHP version or a low PHP memory limit. WordPress requires a minimum PHP version of 5.6, but it is recommended to use PHP 8.0 or higher for better performance and security. To check your PHP version, you can go to your website’s cPanel or contact your hosting provider.
NOTE: PHP 8.0 is a major version update. If your site was running on PHP 7.4 and you want to upgrade to 8.0+, be sure to test the upgrade on a staging server. Never update PHP on a live site without testing it on a staging site first.
If your PHP version is outdated, you can update it to a compatible version. You can do this by going to your hosting account’s cPanel or contacting your hosting provider for assistance. If you are using a managed hosting service, they may have an option to easily update your PHP version through their control panel.
Additionally, you can also check your PHP memory limit, which is the maximum amount of memory that PHP can use on your website. A low PHP memory limit can cause the “There has been a critical error on this website” error. To increase your PHP memory limit, you can add the following code to your website’s “wp-config.php” file:
define( 'WP_MEMORY_LIMIT', '256M' );
This will increase the PHP memory limit to 256MB, which should be sufficient for most WordPress websites. Save the changes and try accessing your website’s wp-admin login screen again to see if the error is resolved.
Step 4: Check Error Logs for Critical Error Messages
If none of the above steps resolve the “There has been a critical error on this website” error, you can check the error logs for more information about the issue. Error logs are files that contain information about errors and warnings that occur on your website. Checking the error logs can provide insights into the root cause of the error.
To check the error logs, you can access your website’s file system using FTP or cPanel, and look for error log files in the root directory or the “wp-content” folder. The error log files may have different names depending on your hosting setup, such as “error_log”, “debug.log”, or “php_error.log”. You can open these files using a text editor and look for any error messages or warnings related to WordPress, plugins, or themes. If you are not familiar with reading error logs, you can ask for help here at Webidextrous or seek help from your hosting provider or a WordPress developer to interpret the logs and identify the issue.
Step 5: Contact Plugin or Theme Developers
If you have identified that a specific plugin or theme is causing the “There has been a critical error on this website” error, but you are unable to resolve it on your own, you can contact the plugin or theme developers for support. Most reputable plugin and theme developers provide support options, such as forums, documentation, or contact forms, where you can report the issue and seek assistance. Be sure to provide detailed information about the error, including the steps you have taken to troubleshoot it, the version of WordPress you are using, and any other relevant details. The plugin or theme developers may be able to provide a solution or a patch to fix the issue.
Alternative Ways to Access WordPress Website When Locked Out of wp-admin
In some cases, the “There has been a critical error on this website” error may completely lock you out of your WordPress website, preventing access to the wp-admin login screen. However, there are alternative ways to regain access to your website, even if you encounter this error.
- Use a Backup Plugin: If you have a backup plugin installed on your website, you may be able to restore a previous backup of your website’s files and database, which can help you revert to a working version of your website. Some backup plugins also provide options to disable plugins or themes directly from the backup plugin’s settings, which can help you deactivate the plugin or theme causing the error. Be careful to understand the implications of restoring a backup. You’ll most likely end up with an older version of your site and will be lacking newer content or customer orders made after the latest backup. But it’s better than starting from scratch.
- Use WP-CLI: WP-CLI is a command line method to access the internal workings of WordPress. Using WP-CLI is not trivial, but it can get you the ability to install, activate, or deactivate and uninstall plugins and themes as well as create a new user and other valuable functions. Depending on the reason for the error, however, WP-CLI may not work.
- Contact Hosting Provider: If you are unable to access your website via FTP or use a backup plugin, you can contact your hosting provider for assistance. Hosting providers often have tools and options to help you resolve issues with your website, including the “There has been a critical error on this website” error. They may be able to provide guidance, restore a backup, or resolve the issue on their end.
Conclusion
Encountering the “There has been a critical error on this website” error in WordPress can be frustrating, but it is a common issue that can be resolved with the right troubleshooting steps. By following the steps outlined in this article, you can effectively troubleshoot and resolve the error, allowing you to regain access to your WordPress website’s wp-admin login screen and get your website back up and running smoothly.
Remember to always back up your website before making any changes, and proceed with caution when modifying core files or making changes to plugins or themes. If you’re not confident in your technical abilities, don’t hesitate to seek help from your hosting provider, plugin or theme developers, or a qualified WordPress developer.
In addition to troubleshooting the error, we also discussed alternative ways to access your WordPress website when you are locked out of the wp-admin login screen. These methods, such as using backup plugins, WP-CLI command line tools, or contacting your hosting provider, can be useful in regaining access to your website and resolving the error.
Gone are the days of clicking “Update” and hoping for the best. Let Webidextrous manage your maintenance. We’ll give you back your time and peace of mind.
0 Comments