Troubleshooting White Screen of Death Errors in WordPress
Sometimes WordPress just stops working. When you visit your site you’re met with is a stark white page and nothing else. It’s aptly referred to as the “white screen of death.”
It can be extremely frustrating and problematic, to say the least, especially when you don’t see and PHP errors listed to tip you off as to the cause of the error.
You could guess what the problem is, but that could take too long. Luckily, there are steps you can take to quickly troubleshoot the problem.
In this Weekend WordPress Project, we’ll take a look at the troubleshooting process for white screen errors, which includes a bit of coding or using plugins. With these tips, your site will be back up in no time at all.
Troubleshooting with Coding
Your wp-config.php file in the root of your WordPress install is the key to figuring out what the problem is with your site. All you need to do is add a few lines of code to turn on debugging mode for your site.
If you would like the full details on debugging your site, take a look at our post Debugging WordPress: How to Use WP_DEBUG. For now, I’ll give you the abridged version.
Turning on debug mode will effectively display the list of current errors. If your site is on a local installation, all you need to do is add one line of code to your wp-config.php file:
Place it above the line in the example below:
If you already see the
WP_DEBUG code in your wp-config.php file, then simply set it to true, without quotation marks.
If you are on a live site, you shouldn’t use this code since all the errors will appear on the front page of your site including your root server file path and other possible sensitive information. Though, there is a way to enable debugging on live sites and limit the error messages to a private log file only.
To enable the error log and debugging for a live site, enter the following code into your wp-config.php file above the
Happy blogging line:
Don’t forget that if you already see this code in place, simply switch the boolean (true/false) values to match the ones in the above example.
Once that’s done, you can check the error messages on the front end of your site for local installs and in your error log on live installs. The log is located in /wp-content/debug.log among your WordPress files.
Once you have checked and identified the error, you can begin to fix it.
Troubleshooting with a Plugin
There are many plugins out there that will help you with troubleshooting errors on your site. If you are still able to access your admin dashboard, you can install a plugin to help identify the errors.
For Multisite installs, there is a plugin that was specifically designed for networks and super admins for troubleshooting called Debug This. It has the most detailed information on most other debugging plugins.
You can also use WP Reset to ensure that if you do something on your site and everything goes to hell, you can restore and reset your WordPress environment with one click.
The above plugins are reliable and are updated frequently to ensure quality and stability. Once you pick your favorite, you can install the plugin and start finding the errors that need fixing.
Checking the Error Log in Your Control Panel
If you are using cPanel, you can check the error log by clicking the Error Log button under the Logs section.
If you’re using Plesk, click the Files tab toward the top of the page, select logs in the menu on the left of the page, then select error_log from the list.
If you are using a different type of control panel and aren’t sure where to access your error log, check with your hosting company or do a quick Google search to find its location.
Other Helpful Tips
There are a few other things you can do to help remedy the situation and figure out what the problem may be.
- Revert back to the current default WordPress theme – If the white screen is gone and your site appears then that means the theme you are using has bugs or is conflicting with one of the plugins you’re using.
- Disable all your activated plugins – If your site comes back up, enable your plugins one by one until the white screen comes back. When it does, you’ll know the last plugin you activated has bugs. And even if it doesn’t, you can have WP Reset as your safety net. All you need to do is open its Emergency Recovery Script, which works even without WordPress. It will let you activate & deactivate plugins and themes one by one until you find the faulty item and get back access to your site.
- Are you using a caching plugin? – You can clear your site’s cache manually through the settings. WordPress doesn’t come with caching by default.
- Check your bandwidth limit – Has it been exceeded? This may cause a white screen error. If it has, you will need to consult your hosting provider.
The white screen error in WordPress is certainly a frustrating one to fix when you aren’t faced with clear error messages right away. Fortunately, these troubleshooting tips should help put you in the know.
If your site is working, but you would like ways to test your site for possible problems and conflicts that could arise in the future, check out our posts 4 Free Plugins to Test Your WordPress Site for Compatibility Issues and Powerful Must-Have Tools for Every WordPress Developer.