Imagine this – you’re browsing a website, and suddenly, you see the dreaded “There has been a critical error on this website” message. As a user, it can be frustrating and confusing, and as a website owner, it can be a nightmare. But don’t worry, this error is fixable, and in this article, we will discuss the reasons for this error and how to fix it.
Cause of there has been a critical error on this website
Before we dive into the solution, let’s first understand what causes this error. There are several reasons why this error can occur, including:
1. Plugin or theme conflicts:
When a plugin or theme is incompatible with your website, it can cause this error.
2. Memory issues:
If your website exceeds the allocated memory limit, it can cause this error.
3. Corrupt files:
Corrupt files in your website’s core code can lead to this error.
4. Database errors:
If your database is corrupted or malfunctioning, it can cause this error.
Now that we know the reasons for this error let’s move on to how to fix it.
How to Fix “There Has Been a Critical Error on This Website” Message?
Fix 1: Check for Plugin or Theme Conflicts
The first step in fixing the “There has been a critical error on this website” message is to check for plugin or theme conflicts. Incompatibilities between plugins or themes can cause this error, so deactivating all plugins and reverting to a default theme can help identify the issue.
Step 1: Deactivate All Plugins
To deactivate all plugins, access your website’s dashboard and navigate to the “Plugins” section. Select all the plugins and choose “Deactivate” from the dropdown menu. This will deactivate all plugins on your website.
Step 2: Revert to Default Theme
To revert to a default theme, navigate to the “Appearance” section of your website’s dashboard and select “Themes”. Choose a default theme, such as Twenty Twenty-One, and activate it.
Step 3: Check for the Error
Once you’ve deactivated all plugins and reverted to a default theme, check if the error has disappeared. If the error is gone, then it’s likely that a plugin or theme was causing the issue.
Step 4: Reactivate Plugins
Reactivate your plugins one by one, checking for the error after each activation. Once you’ve identified the problematic plugin, update or replace it with a compatible one.
By following these steps, you can fix the “There has been a critical error on this website” message caused by plugin or theme conflicts.
Fix 2: Increase Memory Limit
If the error persists even after deactivating all plugins and using a default theme, then it’s likely that your website is exceeding the allocated memory limit. You can increase the memory limit by editing the wp-config.php file or by contacting your hosting provider.
Step 1: Edit wp-config.php File
To edit the wp-config.php file, access it via FTP or cPanel, and add the following code:
define(‘WP_MEMORY_LIMIT’, ‘256M’);
This code will increase the memory limit to 256MB. Save the file and upload it back to your website.
Step 2: Contact Hosting Provider
If editing the wp-config.php file does not fix the error, then contact your hosting provider and ask them to increase your memory limit. They may need to adjust server settings to allocate more memory to your website.
By following these steps, you can fix the “There has been a critical error on this website” message caused by exceeding the memory limit.
Fix 3: Repair Corrupt Files
If the error is caused by corrupt files, then repairing them is the solution. Access your website’s files via FTP or cPanel and navigate to the wp-admin folder. Inside the folder, locate the file named “wp-admin/includes/plugin.php” and download it to your computer.
Step 1: Open plugin.php File
Open the plugin.php file using a text editor, such as Notepad, and search for the following code:
$deprecated = '';
Step 2: Replace Code
Replace this code with the following:
if ( !isset($deprecated) ) {
$deprecated = '';
}
Step 3: Save and Upload File
Save the file and upload it back to your website, overwriting the old file. This should fix the error caused by corrupt files.
By following these steps, you can fix the “There has been a critical error on this website” message caused by corrupt files.
Fix 4: Repair Database Errors
If the error is caused by database errors, then repairing your database is the solution. Access your website’s cPanel and navigate to the phpMyAdmin section.
Step 1: Select Database
Select your website’s database from the left-hand side of the screen.
Step 2: Check Tables
Click on the “Check All” button to select all tables in your database. This will check for any corrupt tables.
Step 3: Repair Tables
Next, select “Repair Table” from the dropdown menu and click on “Go”. This will repair any corrupt tables in your database, which should fix the error.
By following these steps, you can fix the “There has been a critical error on this website” message caused by database errors.
Fix 5: Reinstall WordPress Core Files
If none of the above fixes work, then reinstalling WordPress core files may fix the issue. Follow the steps below to reinstall the WordPress core files:
Step 1: Backup Your Website
Before reinstalling WordPress core files, it’s important to backup your website. This will ensure that you have a copy of your website in case anything goes wrong during the reinstallation process.
Step 2: Download Latest WordPress Version
Download the latest version of WordPress from the official website. Extract the files to your computer.
Step 3: Delete Old WordPress Files
Access your website’s files via FTP or cPanel and delete all files and folders except the “wp-content” folder and the “wp-config.php” file.
Step 4: Upload New WordPress Files
Upload the new WordPress files to your website, replacing the old ones.
Step 5: Run the Installation Script
Access your website’s URL in your browser and run the WordPress installation script. Follow the instructions to complete the installation.
By following these steps, you can fix the “There has been a critical error on this website” message caused by issues with WordPress core files.
Fix 6: Check Server Log Files
If none of the above fixes work, then checking the server log files may provide more information about the error. Follow the steps below to check the server log files:
Step 1: Access Server Log Files
Access your website’s server log files via FTP or cPanel. The location of the log files may vary depending on your hosting provider.
Step 2: Look for Error Messages
Look for error messages related to your website or WordPress. The error message may provide more information about the cause of the “There has been a critical error on this website” message.
Step 3: Contact Hosting Provider
If you’re unable to identify the cause of the error message, contact your hosting provider for assistance. They may be able to provide more information about the error and how to fix it.
By following these steps, you can fix the “There has been a critical error on this website” message caused by issues with server log files.
Fix 7: Revert to a Previous Website Backup
If all other fixes fail, then reverting to a previous website backup may be the only solution. Follow the steps below to revert to a previous website backup:
Step 1: Backup Your Website
Before reverting to a previous website backup, it’s important to backup your current website. This will ensure that you have a copy of your current website in case anything goes wrong during the restoration process.
Step 2: Access Previous Website Backup
Access a previous website backup from a time when your website was functioning correctly. The backup may be stored on your computer or a cloud-based backup service.
Step 3: Restore the Backup
Restore the backup to your website using the backup service or by uploading the backup files via FTP or cPanel.
Step 4: Test Your Website
Once the backup has been restored, test your website to ensure that it’s functioning correctly. If everything is working as expected, then you have successfully fixed the “There has been a critical error on this website” message.
By following these steps, you can fix the “There has been a critical error on this website” message by reverting to a previous website backup.
Fix 8: Seek Professional Assistance
If you’ve tried all the above fixes and the “There has been a critical error on this website” message still persists, then seeking professional assistance may be the best option. Follow the steps below to seek professional assistance:
Step 1: Research Professional Services
Research professional services that specialize in fixing WordPress errors. Look for services that have experience with fixing the specific error you’re encountering.
Step 2: Contact Professional Service
Contact the professional service you’ve chosen and provide them with information about the error you’re encountering. They may request access to your website’s files and database to diagnose the issue.
Step 3: Allow Professional Service to Fix the Error
Once the professional service has diagnosed the issue, they will provide a solution to fix the error. Allow them to fix the error on your behalf.
Step 4: Test Your Website
Once the error has been fixed, test your website to ensure that it’s functioning correctly. If everything is working as expected, then you have successfully fixed the “There has been a critical error on this website” message.
By following these steps, you can fix the “There has been a critical error on this website” message by seeking professional assistance.
Read more: Xbox Error Code 0x80004005: Reasons and How to Fix It
Conclusion
Encountering the “There has been a critical error on this website” message can be frustrating, but it’s fixable. By following the steps outlined in this article, you can identify the cause of the error and fix it. Whether it’s caused by plugin or theme conflicts, memory issues, corrupt files, database errors, server log files, or other issues, there’s a solution. Don’t hesitate to seek professional assistance if needed. With these solutions, you can get your website back up and running smoothly.
FAQs
The message indicates an error that is preventing the website from functioning correctly.
The error can be fixed by checking for plugin or theme conflicts, increasing memory limit, repairing corrupt files or database errors, checking server log files, or seeking professional assistance.
By following the steps outlined in this article, you can identify the cause of the error.
If none of the fixes work, revert to a previous website backup or seek professional assistance.
Regularly updating plugins and themes, backing up your website, and monitoring server logs can help prevent this error from happening again.
Yes, the error can cause data loss if not fixed promptly.
The time to fix the error varies depending on the cause of the error and the complexity of the fix.
Prachi Mishra is a talented Digital Marketer and Technical Content Writer with a passion for creating impactful content and optimizing it for online platforms. With a strong background in marketing and a deep understanding of SEO and digital marketing strategies, Prachi has helped several businesses increase their online visibility and drive more traffic to their websites.
As a technical content writer, Prachi has extensive experience in creating engaging and informative content for a range of industries, including technology, finance, healthcare, and more. Her ability to simplify complex concepts and present them in a clear and concise manner has made her a valuable asset to her clients.
Prachi is a self-motivated and goal-oriented professional who is committed to delivering high-quality work that exceeds her clients’ expectations. She has a keen eye for detail and is always willing to go the extra mile to ensure that her work is accurate, informative, and engaging.