There are few things worse than loading your website and seeing a blank, white screen. No error message, no clear problem, just the white screen of death.
This is one of the most common WordPress errors. The worst part? This problem can make your WordPress site inaccessible to not only visitors, but administrators, too.
What is the white screen of death?
The white screen of death (WSoD) shows up when an error takes place in a website’s PHP or database. The WSoD might also appear as a message, “This page isn’t working and is unable to handle the request,” or “Site is experiencing technical difficulties.” This is known as an HTTP 500 error.
Luckily, the white screen of death can be fixed! The first step of troubleshooting an HTTP 500 error on a WordPress site is to determine if you have access to wp-admin. Try going to your login page and signing in. If the front-end of the website is down, but the admin is working, there’s a good chance it’s due to a faulty theme or plugin.
If a script on your website is exhausting the memory limit, it can also lead to an HTTP 500 error. Because the white screen of death has different causes, there are several options to fix it.
This article will teach you how to fix the white screen of death by:
Using WordPress debugging tools
WordPress comes with specific debug systems designed to simplify the process as well as standardize code across the core, plugins, and themes. Think of debugging as a roadmap to see where an error is coming from and what the root cause is.
To learn how to debug via
WP_DEBUG, WP_DEBUG_LOG, WP_DEBUG_DISPLAY, SCRIPT_DEBUG, and
SAVEQUERIES, click here.
While the debugging tools won’t necessarily fix your problem, they can help point you in the right direction. That’s why it’s a good first step to take when troubleshooting a white screen of death, that way you don’t spend any extra time trying to solve the wrong thing.
If you’re unsure about any errors you’re seeing after enabling WP_DEBUG, contact us and include the error message and site you’re working on. We’re happy to help!
How to fix the white screen of death by disabling WordPress themes and plugins
A lot of times, a WordPress site goes down because there’s a plugin conflict or a plugin isn’t supported by the version of PHP running on the server. Think about the last 24 hours: Were any new themes or plugins installed on the site? Disabling a recently downloaded plugin or switching themes is the best place to start.
If you have access to wp-admin…
Log in and disable the plugin or theme you think may be causing the problem. Once it’s deactivated, do a hard refresh on your site. If it loads, you’ve found the culprit! If you’re still seeing the white screen of death, you have two options: you can either disable a different theme or plugin, or you might have a different cause behind your HTTP 500 error.
If you don’t have access to wp-admin…
It’s still possible to disable your themes and plugins via SFTP. Connect to your website, and navigate to the wp-content folder. This is where you’ll find all your site’s theme and plugin files. By renaming the files, you can deactivate the theme or plugin on your site. After you’ve made a change, do a hard refresh on your site. If it loads, that means you found the correct plugin! (And should now be able to log into wp-admin again). If you’re still seeing a white screen of death, you may have a different problem on your hands.
Pro-tip: Sometimes the problem isn’t a single plugin or theme, but how they’re interacting with one another. To rule this out, you may need to disable all themes and plugins, and reinstall them one at a time. Our step-by-step guide to troubleshooting plugin conflicts can help with that.
Beyond conflicts, outdated WordPress plugins can sometimes cause HTTP 500 errors. If you’ve been putting off updates, I recommend running those to ensure your plugins and theme are in tip-top shape!
How to fix the white screen of death by using a backup of your site
If you discover a WSoD soon enough, one of the easiest ways to get rid of it is to roll your site back to a recent backup before the error occurred. This process can help you pinpoint when the error started, so it’s easier to identify what changed and potentially caused the HTTP 500 error.
Even if you don’t personally take backups of your site, most managed WordPress hosting providers automatically run backups of your site and offer a restoration process. If your site is hosted on Flywheel, we take a backup of your site every night and store the last 30. You can quickly and easily restore a backup on your own right from the Flywheel dashboard. If your site is hosted with a different provider, try contacting them to request a restore.
Once you’ve rolled your site back, don’t forget to still try to find what caused the error in the first place. Was it a new plugin on the site? An update that didn’t finish correctly? While getting rid of the white screen of death with a backup is good (because it means your site is back up!), remember to take the next step of determining what the cause was, so you don’t repeat the same situation.
How to fix the white screen of death by increasing your site’s memory
Sometimes an HTTP 500 error is caused because your site has maxed out its allocated memory. If you’re getting an error that says “Allowed memory size of xxxxxx bytes exhausted,” that’s an indicator that you’ll need to go in and increase memory.
Note: Most managed WordPress hosts take care of this for you, since it’s a server-level setting. If your site is hosted on Flywheel, just send our support team a message that you need your site’s memory increased and we’ll get it patched up.
The manual solution for this is assigning more PHP memory to the application. This can be done through the wp-config.php file on many installs; just add the following code to the file:
To increase PHP memory to 64MB:
define( 'WP_MEMORY_LIMIT', '64M' );
To increase PHP memory to 96MB:
define( 'WP_MEMORY_LIMIT', '96M' );
Note: For security reasons, Flywheel locks down your wp-config.php file and doesn’t allow changes to be made directly to it. We do this because it gets auto-generated by our software and because most everything you’d want to do there automatically gets configured for you.
WordPress will automatically check if PHP has been allocated less memory than the entered value before utilizing this function. For example, if PHP has been allocated 64MB, there’s no need to set this value to 64M as WordPress will automatically use all 64MB if need be.
How to fix the white screen of death by resolving syntax errors
Syntax errors are typically caused by a mistake in your code syntax. You may have accidentally mistyped or pasted in the wrong syntax, and that caused the WSoD.
The easiest way to resolve syntax errors is to roll your site back to the version before the white screen of death. This pushes your site back and restores it to the last backup before the errors were made, rather than having to jump in and edit the code.
Another way to resolve syntax errors would be to edit the file(s) mentioned in the syntax error. Typically a syntax error will reference a file along with the line of code in which the error is found.
To edit the impacted file(s), you can take two different approaches:
- Download the impacted files via FTP or SFTP, depending on your server settings
- Use a tool offered by your web host to edit a file directly on the server
An FTP client is an application that helps you connect to your website and transfer files using the FTP protocol. Some free solutions include Filezilla and Cyberduck. Once you’ve downloaded the impacted file(s), try to determine the source of the error based on the line code in a text editor, such as Sublime. Once you believe you’ve corrected the syntax error, upload the file back to your server via FTP. Hard refresh your site to see if your site returns to its normal state.
The second option is available if your web host offers a tool to edit a file directly on the server through an online file management tool. If they offer a tool of this nature, you can log in, find the file, make the necessary changes, then save.
Pro-tip: You can avoid a white screen of death caused by syntax errors by making site updates in a local environment, instead of your live site. Local is a free solution specifically for WordPress sites that makes it easy to pull a copy of your site for offline editing and push changes live to production.
How to fix the white screen of death by identifying file permission issues
Having incorrect file and folder permissions can cause errors on your WordPress site during upload, resulting in the white screen of death.
Why? Because file and folder permissions tell the server who can read, run, or modify files hosted on your account. Typically, WordPress will warn you that it can’t edit a file, create a folder, or write to disk. However, sometimes you may not see an error message.
To check what file and folder permissions your site has, connect to your site via FTP. Once you’re connected, go to the root folder of your WordPress site.
From there, select all folders in the root directory and right-click to select “File Permissions.” A new box should pox up with a numeric value. The recommended value is “755,” so if you’re seeing something different, go ahead and change it. Click the “Recurse into subdirectories” checkbox and then select the“Apply to directories only” option. Click “Ok.” Your FTP client will start setting file permissions to folders and subfolders, so give it a few minutes to finish up.
Next, select all the files and folders within the root folder of your WordPress site and right-click to select “File permissions.” This time, the numeric value in the file permissions box should be “644.” If it’s something different, enter the new value, click on the “Recurse into subdirectories” checkbox, and then select the “Apply to files only” option. Click “Ok” to continue.
Now, your FTP client will start setting file permission to all the files on your WordPress site. Give this a few minutes to finish up and then hard refresh.
How to fix the white screen of death by completing a WordPress update
Sometimes WordPress runs into an issue with updates. Most of the time, it resolves itself, but occasionally it leads to the white screen of death.
There are two ways to complete a WordPress update:
- Deleting the .maintenance file
- Manually updating
The first step is to go into your WordPress root directory and see if there’s a .maintenance file. The name begins with a dot, which means it’s a hidden file. If you don’t see it using your FTP program, try logging into your server’s control panel and using the file manager to find and delete it. After deleting that file, load up your site again. If the update was successful, and WordPress just failed to remove that file automatically, your site will load like normal.
If you’re still seeing problems, there’s a chance the update wasn’t successful. In this case, you may need to manually run the update. This guide can help you do that.
The white screen of death can be caused by a number of problems. While getting your site back up and running as soon as possible is important, keep in mind that understanding the problem and why it happened can prevent future HTTP 500 errors. With these steps, you’ll be able to get your site back up and running in little to no time!
Trying to make edits on a live site is scary and we don’t usually recommend it. It can lead to broken sites or worse, the white screen of death. That’s why we have Local, our local development tool loved by developers all around the world!
In addition to the ease of pulling down live sites for offline editing, you can also push local sites live with a few quick clicks, sync up your tools for a simplified process, and so much more! Download Local for free and avoid those WSoDs! Try it for yourself!