How to Fix the White Screen of Death in WordPress
Fixing the white screen of death in WordPress can be a frustrating issue. This is because it has the possibility of being caused by one of many issues, such as faulty plugins and themes or issues with the amount of PHP memory your site has access to. If you’re seeing a white screen in your WordPress dashboard as well, you’re likely facing an issue with a poorly-coded theme or plugin, and you may want to look into that first.
Before you do anything, take a moment and think about what actions you took prior to the white screen appearing on your site. Did you install a new theme or plugin? Did you update a theme or plugin? Did you modify your theme’s files recently? All of these actions lead to new changes on your site, leaving it vulnerable to errors.
The issue may also be on your end. Test your website in another browser or on your mobile device. If the white screen does not display, it may be caused by your own browser. Clear your browser’s cache, and try again.
If you’re ready to start the troubleshooting process, make sure you take a moment to backup your site prior to making any changes. You don’t want to cause additional issues.
White Screen of Death Cause #1: Plugins
Faulty or poorly-coded plugins are common causes for this issue, and you’re more likely to experience them after installing a new plugin or updating a current one. If the issue has not spread to your dashboard, go to the Plugins screen, and deactivate all of your plugins.
Refresh your site to see if the white screen goes away. If it does, it was likely caused by a faulty plugin. Activate each plugin one by one, and refresh your site after each activation to see which plugin is causing the issue. Remove it from your site entirely, and find a suitable replacement.
Deactivating Plugins with an FTP Client
If you are not able to access your dashboard, you’ll need to use an FTP client to deactivate your plugins.
This example uses FileZilla, which you can download here. Once you’ve installed the program on your system, open it, and navigate to File > Site Manager.
Click New Site, and enter your site’s name. Fill in these details for the settings:
- Host: yourdomain.com
- Port: Leave blank.
- Protocol: FTP – File Transfer Protocol
- Encryption: Only use plain FTP (insecure)
- Logon Type: Normal
Use the username and password you use to access your site through your host. If your host uses cPanel, this is the username and password you use to access it.
Open the Transfer Settings tab, tick the Limit Number of Simultaneous Connections box, and enter 8 as the Maximum Number of Connections. This is especially important if you use a shared hosting server to power your site as selecting this option decreases the likelihood of your host’s server blocking your IP address from accessing your site through the FTP client.
Click Connect once you’re finished.
Open the same folder you use to access your WordPress root directory through your host. This is typically public_html.
Open the wp-content folder, and locate your Plugins folder. Right-click it, and rename it anything you want, such as “plugins-old”.
Refresh your site to see if the white screen of death goes away. You may need to refresh the FTP client as well, as depicted above. If the screen does go away, it was likely caused by a faulty plugin.
Rename the folder back to “plugins”, and open it. Make a list of all of the plugins you have. Delete each plugin’s folder one by one, refreshing your site as you go to see which plugin is causing the issue. Once you find it, sign back into your WordPress dashboard, reinstall all of the plugins you deleted, and replace the one that was causing the issue.
White Screen of Death Cause #2: Themes
Themes may be the cause of this issue for different reasons. If you’re able to access your dashboard, open the themes page, and activate a different theme. Install a free theme from the WordPress repository if need be.
Refresh your site after activating a default theme to see if the white screen goes away. If it does, it was likely caused by your theme.
If you cannot access your WordPress dashboard, use the steps above to access your site’s files via an FTP client. Navigate to the same folder that contains your Plugins folder, but look for your Themes folder instead.
Right-click on the folder, and rename it to deactivate your theme. Refresh your site to see if the white screen goes away. If it does, it was caused by your theme.
What to Do if You Have a Faulty Theme
The most common reason for a theme to cause an issue on your site is poor code. This is either due to the theme’s default code or any modifications you’ve made to the theme’s code and files.
If you haven’t made modifications to your theme’s files, you may need to contact the theme’s developer or consider using a different theme entirely.
If you’ve modified your theme’s files or code, remove your modifications to bring your theme back to where it was when you installed it. If you did not use a child theme and have no backup for it, delete it and reupload it.
It’s highly recommended you use a child theme to modify your theme’s files. You can easily create one on your own. Aside from that, always keep a backup of your theme’s original files and code.
White Screen of Death Cause #3: PHP Memory Limit
Your site’s performance is based on a few different factors, PHP memory limit being one of them. When your site grows to the point where it begins pushing the limits of everything that powers it, including the amount of memory it’s using, it can lead to a number of different issues, including the white screen of death.
There are a few different ways you can increase your site’s PHP memory limit within WordPress, but they all involve adding small snippets of code to specific files.
The best way is through adding a snippet of code to your wp-config.php file, which you can access via an FTP client by opening your site’s root directory. The wp-config.php file is in the same folder as your wp-content and wp-admin folders.
Only use one of these options.
Open your wp-config.php as a text file on your computer, and back it up before adding new code to it. Add this code to the top of the file:
If you have access to your php.ini file, add this code to it:
memory_limit = 64M
As a third option, you can add this to your .htaccess file:
php_value memory_limit 64M
If you add one of these snippets of codes to your site, refresh your site to check for white screen of death issues. If it’s gone, it was likely caused by PHP memory issues.
Your host has its own PHP memory limit it sets for your individual server, and you’ll likely need to contact them directly if you suspect your site is exceeding its limit. They may be able to raise your limit, but it may require you to upgrade your hosting package or upgrade to a new host entirely.
Debugging Your WordPress Site
Warning: These instructions are for experienced developers only. Novice WordPress should proceed with caution.
If you cannot find a solution to your problem, you may need to debug your site. This displays a list of errors on your site, which may reveal a serious issue, serious enough to cause the white screen of death to appear on your site.
To turn on debugging, locate the WP_DEBUG code in your wp-config.php file, and change “false” to “true” like so:
define( ‘WP_DEBUG’, true );
Simply turning this on isn’t enough as it’ll display issues on your site for all to see, leaving your site vulnerable to attacks from hackers. Add this code to hide it:
define( ‘WP_DEBUG_DISPLAY’, false );
Lastly, you need somewhere to view the errors, so add this code as well:
define( ‘WP_DEBUG_LOG’, true );
This saves your errors to a file called debug.log, which will appear in your wp-content folder. The reason why debugging isn’t recommended for novice users is the fact that its errors are written in code rather than plain text, which may make it difficult for novice users to decipher what each error means and whether it’s a minor or site-breaking issue.
The white screen of death is one of the most irritating issues you can have on your site. It shuts it down entirely by blocking all of your content for all users. It also has no clear cause, requiring you to troubleshoot and troubleshoot to find an issue.
Always start the troubleshooting process with deactivating all plugins and your theme if you can. Make sure you take the time to ensure your plugins and theme are compatible with the latest version of WordPress prior to updating them and vice versa.
If you feel you’ve done everything you can, you may need to contact your host and ask if the issue is on their end or if you need to upgrade your hosting package. If you need a quality host, check out our guide on the best WordPress hosts.