You are working on your WordPress site and suddenly you met with an error of white screen of death. The white screen of death is one of the common errors of wordpress. The worst thing about this error is that you can not access your administrator and visitors and you get more frustrated because you can not see any error message and locked out of the wordpress. There is actually no error of white screen of death and you will get the plain white screen as below:
Why do you see the white screen of death?
It is possible that you see the white screen of death due to the following reasons:
- The script on your website exhausted the memory limit
- Due to poorly coded theme or plugin
- The issue with the web hosting server
When you get a white screen of death in WordPress the first thing you have to do is to determine that admin on your site is working or not? If the frontend of your site is down and the admin panel is working accurately then maybe you have a problem with your theme or a plugin. If you have multiple sites running on the same hosting account, then start checking the problem on other sites as well. If this error occurs on other sites, then that means there is a problem with your hosting server.
How to fix the white screen of death?
There are several methods which will help you in fixing the white screen of death issue in WordPress which are as follow:
- Disable plugin or theme
- Resolve syntax error
- Switch on debugging
- Increase the memory limit
1. Disable plugin
If you see a white screen of death then the most common way to get rid of this to deactivate all your plugins. Sometimes your site goes down due to a bad plugin update. The easiest way to do this to click on the plugin option from your sidebar and select deactivate from the action menu. This will deactivate all plugins. If this fixes your issue that means one of your plugins is the reason for this issue. Now activate them one by one, reload your site after each activation. When your front-end goes down you’ve found the misbehaving plugin. Reach out the plugin developer for help.
If you can’t access your admin you can FTP into your server and rename your plugins folder to something like plugins_old. Then check your site again. If it works, then you will need to test each plugin one by one. Rename your plugin folder back to “plugins” and then rename each plugin folder inside of if it, one by one, until you find it
2. Resolve syntax error
Another reason for the white screen of death is that you recently edit the code of your WordPress website and there is a chance that you mistyped something or your syntax is not correct. A single wrong character in your code can take down your site. Never edit your code in the live production site. Just revert your recent changes and refresh the page. But always keep a backup in case you forget about where you made a change.
3. Switch on debugging
If you have tried the above step and still you are facing the white screen of death then you need to enable debugging which will expose errors. To enable debugger you have to open the wp-config.php file and within that file, you have to find the following line
define( 'WP_DEBUG', false )
Replace false with true and refresh your site and if it is not available in your code you can add it at the top. By doing this step you can now see a white screen with an error message. There you can find the error and you can then resolve it.
4. Increase the memory limit
If you get an error that says about memory limit then you need to assign more memory to your application. You can do this through the wp-config.php file. Just add the following line of code to the file.
You can also use the .htaccess file in your wordpress root directory to increase the memory limit. Simply add the following line in it.
php_value memory_limit 64M
If increasing the memory limit does not help you in resolving the white screen of death in WordPress then move to the next solution.
Try these solutions to resolve the issue of the white screen of death. If you have any questions regarding this article mention them in comments.