How to Fix Critical Error in WordPress
MD Zakaria Islam
Senior WordPress Developer, Expert in developing WordPress Theme, Plugin, Gutenberg Block. A big fan of Headless WordPress. Talks about PHP | Javascript | React | Vue | Laravel | Shopify App Development
It is one best common issue that you can face at any time, yes, I am talking about the critical error in WordPress. This error can be caused due to a number of reasons. But I think the following two reasons are main that I have faced in my 7+ years of experience with WordPress.
Need help in fixing WordPress Theme or Plugin issues, Contact Me
The common reasons for Critical Error in WordPress are —
- Syntax Error
- Plugin Code Conflict
WordPress is basically developed with PHP programming language. If your theme contains any PHP syntax error, then you can face the critical error.
If there is a conflict of your theme with any activated plugin, the critical error can be caused.
How to fix the Critical Error issue
First of all, I highly recommend making the WP_DEBUG true. to do this, you have to access to your wp-config.php file. You can use an FTP account or access using Cpanel. Then simply make the WP_DEBUG true.
As a result, it will show the reason for generating the critical error. Then you have to follow the instruction to fix it.
Syntax Error: If it shows the syntax error, it will include the file name and number. So, follow the instruction and fix the issue.
Plugin Conflict: In this case, rename your plugins folder name like plugins_old. Then, you will find that the critical error is gone. Now, reinstall your plugins and check them one by one. Finally, find out the plugin that is responsible for creating the critical error.
Finally, remove the plugin and choose a better alternative.