How to fix WordPress critical error: Step by Step guide for
If you’re a WordPress
user, there’s a chance you’ve come across with this message:
“There has been a critical error on this website.”
This error might look frustrating— it appears with a white screen, logging you out of your website admin panel. But don’t panic. A WordPress critical error is usually fixable in a few steps. In this guide, I will guide you through how you can easily fix this issue.
What Is the WordPress Critical Error?
A critical error is WordPress’s way of saying that something is broken badly enough that the site can’t load properly. Usually, this happens because of:
- A faulty plugin update or theme update
- Syntax error in your custom php code or in js.
- Corrupted core files
- Memory limit exhaustion
- PHP version conflicts
- Sudden stop while updates
Before WordPress version 5.2 kind of error leads us to blank white screen in technical terms which often called as "White Screen Of Death". After 5.2 they have introduced the system where it can show error message and sent us an email to admin.
On the error window you will able to see the WordPress guide about how to fix this issue.
Step-by-Step: How to Fix the Critical Error
1. Enable WordPress Debug Mode
With the the help of debug mode you can easily able to identify the source of error.
Steps:
- Access your hosting files by using FTP or cPanel.
- Open your wp-config.php file.
- Find line: define("WP_DEBUG", false);
- Replace this with:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
This will log your errors in your wp-content/debug.log file.
2. Deactivate All
Plugins
A faulty or recently updated plugin is often causing the issue.
- If you can access the dashboard: Go to Plugins → Installed Plugins → Deactivate All.
- If the dashboard is
inaccessible:
* Use FTP/File Manager.
* Go to wp-content/plugins/.
* Rename the plugins folder to plugins_old or with anything with you want. - Now we have to check if the site loads. Your page will not look exactly same like it is looking earlier but you can able to check if your site loads or not.
- If site loads properly now go to your website admin dashboard and start reactivating plugins one by one.
- While activating any plugin if you face the site critical error issue then that plugin is culprit.
3. Switch to a Default Theme
If you got this error window after updating or activating your theme then in that case your theme is having the issue.
- Access wp-content/themes/ via FTP.
- Rename your active theme’s folder (e.g., astra → astra_backup).
- WordPress will automatically switch to a default theme like Twenty Twenty-Four if installed.
If the site works
again, your theme likely caused the issue.
4. Increase the PHP Memory Limit
A low php memory will also trigger a critical error on your website. When you want to fix it you can do this following things.
Edit wp-config.php file and add this code line.
6. Restore a Backup (If All Else Fails)
define( 'WP_MEMORY_LIMIT', '256M' );
You can also able to handle this task from your hosting panel or in your websites php.ini file.
5. Update PHP Version and WordPress Core
Outdated PHP version or WordPress core version can also create a compatibility issues and your website may show critical error.
- Update PHP version higher than 8.0 version because most hosting providers removed support of lower php versions.
- Ensure WordPress core, themes and plugins are up to date.
6. Restore a Backup (If All Else Fails)
In case if every case fails then you have the option to restore your website backup. You can able to get backups using a lot of plugins in your WordPress website. There are plugins likely with name updraftplus, All in One WP migration, WPVivid Backups etc available for free in WP library.
Best Practices to Prevent Future Critical Errors
- Regularyly update your WordPress core, Plugins and themes.
- Only use trusted and paid plugins (Do not use cracked or pirated plugins.).
- Enable automatic backups you may use ManageWP, Jet Plugins etc.
- Major updates should be done on your staging website.
Conclusion
A critical error might be frustrating but it is usually just telling you that your recent updates or code changes done something wrong to website. By following the above steps you will be able to resolve the issues.


Comments
Post a Comment