The White Screen of Death
Both PHP errors and database errors can manifest as a white/blank screen, a blank screen with no information, commonly known in the WordPress community as the WordPress White Screen of Death (WSOD).
Before resorting to desperate measures, There are several reasons for WordPress white screen of death. We will be explaining the ones most likely to occur – Plugins, Theme, and Other Causes.
Plugins
No matter how hard developers try, it is basically impossible to write plugins that will work and play well together with every single theme and vice versa. If you experience a white screen after activating the theme, the problem could be a plugin that is in conflict with the theme. Try the following:
- If you can access the Administration Screens, but get the white screen on the front end, login to your WP Admin Dashboard and try deactivating all of your plugins. After doing so, check your front end again and see if you are able to access it which means you have a plugin conflict for sure. Now, start activating each plugin one by one and keep watching the front end after enabling each plugin. If you see the white screen again on the front end, you will know that the last plugin you activated was the culprit. Deactivate it and continue checking all remaining plugins one after the other to make sure there are no others.
- If you’re unable to access both front end and back end screens, then login to your website via any FTP client. Locate the folder
wp-content/plugins
and rename it towp-content/plugins_old
. This will deactivate all of your Plugins. Now check if this will resolve your problem, then login to your WP Admin Dashboard and access plugins page. This will deactivate all of your plugins and change yourwp-content/plugins_old
back towp-content/plugins
. Now try to re-activate them one by one till you know which one is causing this issue.
Themes
If you are experiencing the white screen of death after you have just activated a new theme, then there must be corrupt file/files in theme directory for sure and files corrupt normally when a theme is not properly uploaded via Upload Theme action under Appearance -> Themes
. or you’re PHP memory limits set too low.
Try this:
- If you can access the Administration Screens, disable all plugins as described above, change the theme to one of the WordPress default theme (e.g. Twenty Seventeen). Check if this resolves the problem. If it does, try reinstalling the theme by completely removing the old copy in
/wp-content/themes/
and install a fresh copy. We recommend this using FTP because you will have less chances of error when you use HTTP WordPress theme installer. Activate the replacement theme and see if the white screen condition returns. - If you’re unable to access both front end and back end screens, then login to your website via any FTP client. Disable all of your plugins by following the plugins instructions above, and delete the theme entirely. This will force WordPress to use the default WordPress theme. See if the problem persists. If it does, then the problem is probably in your WordPress installation. If the problem does not occur, then install a fresh copy of the theme via FTP, activate it and see if the problem reappears.
- You may also be suffering from a web server configuration that is set with PHP memory limits too low. If this is the case, it can cause the white screen condition as well. Check with your web hosting service provider and ask them to increase your PHP
memory_limit
to at least 64MB. 128MB is recommended.
Other Causes
The following are list of possible other causes for the white screen condition, because they too can cause this error:
- Blank space in
functions.php
– This is easy to do if you’ve been modifying the file. A good way to check is to replace it with the unchanged version of the file and see if the site works. - Blank line in
wp-config.php
– a blank line at the start of this file can bring on the white screen of death. Check for extra spaces at the end as well. - File Permissions – Make sure all the folders are set with permission of 755 and the files 644. This should not happen because the server should inherit the permissions of the files that get uploaded to the server. But we have seen occurrences where, for instance, unpacking a ZIP archive using cPanel and other interface tools botched permissions. Setting permissions either too strict or too loose often cause this and other errors.
- Multiple Plugins – When you’re reactivating all of your plugins except the one which you find that causes the problem may not be the only one. Sometimes its a combination of two or more. So you may think you have the problem solved, but it may still exist and come back in the future.
Tips
- Check your error logs. A good amount of the time, server logs will show exactly what PHP function is causing the issue, and where.
- Run a PHP validator on the code prior to saving. It will catch a lot of simple known mistakes.