There Has Been a Critical Error on Your Website [Error Fix]
Upgrading your PHP version is should fix this quickly
4 min. read
Updated on
Read our disclosure page to find out how can you help Windows Report sustain the editorial team. Read more
Key notes
- If you are dealing with There has been a critical error on your website, it might be because of malware infections.
- You may fix this issue by increasing the PHP memory limit.
- Disabling all your plugins can also solve this problem in no time.
Also known as the white screen of death, there has been a critical error on your website is one of the most dreadful errors site owners encounter on WordPress.
What makes this issue frustrating is that it does not reveal much detail about the potential cause. Fortunately, there are proven fixes that will you eliminate the error for good.
What causes a critical error on my website?
Below are some of the potential causes of there has been a critical error on your website:
- Malware infection: One of the prominent causes of this error is the infection of your core site files. You need to perform a deep malware scan to eliminate these viruses to fix this issue.
- Issues with themes and plugins: If your themes or plugins are faulty, you are likely to encounter this issue. You can fix this by using the default theme and resolving the plugin’s conflicts.
- Low PHP memory limit: When the memory limit you set for PHP is low, you can face different issues. Raising the memory limit should help you solve the problem.
How do I fix there has been a critical error on your website?
Listed below are some basic troubleshooting steps to try before moving to the sophisticated solutions in this section:
- Clear site cache.
- Upgrade the PHP version if it is lower than 7.4.
- Scan files for malware.
- Check error logs for crash reports.
- Rollback site with backup.
If you still can’t eliminate this error, proceed to the fixes below:
1. Enable debugging on WordPress
- Sign into your FTP account.
- Locate the wp-config.php in the root WordPress directory.
- Now, add the following lines of code to the line before the final message:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', true );
There has been a critical error on your website can be fixed using the debugging feature of WordPress. After enabling it, your WordPress website should now display debugging information.
After debugging, ensure to remove the code from your PHP file.
2. Switch to the default theme
- Visit the WordPress.org theme directory and download one of the default themes like Twenty Twenty-Three.
- Now, extract the file on your PC.
- Login to your FTP account and navigate to the wp-content/themes folder.
- Next, download all the theme folders on your PC as a backup.
- Now, delete the original theme folders.
- Finally, upload the default theme folder you downloaded, and your WP site should have a default theme.
If you are not using the default theme, problems, like there has been a critical error on your website, can occur. The easiest way around this is to revert to a default theme.
3. Disable Plugins
- Access your site with FTP and double-click the wp-content folder to open it.
- Now, rename the plugins folder to plugins_old. Alternatively, you can open the folder and add _old to the individual plugin files.
- You should now be able to get into your WordPress site, where you can enable the plugins one after the other.
In some cases, this issue can be due to plugin conflict. To solve it, you need to disable all the plugins and reactivate them one after the other.
4. Increase the PHP memory limit
- Log in to your site via FTP, right-click wp-config.php, and select Edit to open it.
- Now, insert the command below before the last line of your PHP command:
define( 'WP_MEMORY_LIMIT', '128M' );
- Finally, save the code.
There has been a critical error on your website that can occur if your server can not run PHP because of insufficient resources. The solution to this is to increase the PHP memory limit.
Note that you shouldn’t overly increase your PHP memory limit unless a plugin specifically requires it. And in this case, increasing it to 265M should do.
With this, we can now conclude this detailed guide on how to fix there has been a critical error on your website. Just ensure you follow the instructions therein, and you should be able to access your WordPress website.
If you are facing security issues on your WordPress website, check our detailed guide to fix it.
Feel free to let us know the solution that helped you fix this issue in the comments below.
User forum
0 messages