You shout, you cry, you throw your arms up in disgust. With your blood pressure on the rise, you curse the screen. How could this have happened? You have a white screen of death staring you in the face and you have absolutely no idea how to fix it. At this point, menacing thoughts are running through your mind. You spent so much time working on this site or paid an agency to build your wonderful website, which is the foundation of your business, organization or service. With the world seemingly married to online life, your site is the gateway to your organization’s services or message. Oh wait! Its gets worse. It’s only a matter of time before a client, boss or co-worker sends you an email or you receive a frantic call that the site it down!
Relax, that nefarious white screen is usually easy to fix
If your company or organization is heavily reliant on its website, the best thing you can do right now to prevent future stress is adopt the mentality that your site will occasionally go down. In other words, learn to be proactive by investing in quality web management. The reality is that your WordPress site or any site for that matter will go down at least once a year and probably a few times. It could be down for 20 minutes or 3 days. Yes, we understand. You can’t have that because your business or the message of your organization is critical for the existence of the universe.
Once you forge a mentality that websites, including yours, reside in a chaotic environment called the Internet, you will become immensely better at managing your site and getting it back online as soon as possible. If you are a small business or non-profit, you might not have a full-time web person or the web person (that might be you) might not be familiar with WordPress. At this point you have two options. Get the site back up yourself or pay an agency a monthly fee to maintain it. If you are really serious about your business or organization, then you need to take web maintenance serious. The more your site is neglected, the higher likelihood it will go down. You perfrom mainteniance on your car don’t you? Do you go to the doctor for that annual physical? Sites that aren’t maintained, aren’t updated and have too many plugins will eventually malfunction. Even if they are properly maintained, they still might go down from time to time.
What usually causes of the ‘White Screen of Death’ on a WordPress site and how to fix it?
Before I go any further, I find it necessary to mention that you should always have a backup of your site and don’t assume that your hosting company has configured automatic backups for you. Again, you need to be proactive here and speak directly to your hosting company about what sort of backup options they offer. They may charge you an extra fee, but it could be worth it in the long run. If you don’t have a backup and find yourself at this article hoping to find an answer, then take a breath and relax. When it comes to the web, there is a solution for everything. Well, most of the time. With that being said, below are the usual suspects that cause the ‘White Screen of Death’ and the solutions to fix them.
More often than not, it is a plugin that is bringing down your site. More specifically, one of your plugins in not playing nicely with the other plugins or your theme. Were you updating or adding a new plugin when the site went down? If so, that increases the likelihood a plugin is causing your universe to collapse. For best WordPress practice, it is also best to limit the amount of plugins on your site. I reccommend no more than 7 and if you really have to, then you can increase that number to 8 or 9. As a web manager, I’ve been handed the keys to a fair amont of sites that had 15 to 20 plugins. Such sites almost always eventually get bogged down with issues. Don’t get me wrong. Plugins are great and they offer amazing functionality without additional coding, but they must be used in moderation.
What you need to do now is deactivate all of your plugins and then reactivate each one until you find out which one is causing the problem. Since you cannot get into your WordPress Dashboard, you will have to either access the site via FTP or through your CPanel. The screen shots below are of the CPanel. When you get into your CPanel, look for the folder called
wp-content. Click on that and you will see a folder for ‘plugins’. You want to rename your ‘plugins’ folder. In the example below, I renamed my plugins folder to ‘plugins-off’.
After deactivating the plugin folder, try to load the site. If the site loads, then there is no doubt that a plugin is causing the issue. I can tell you from experience that plugins cause the white screen of death about 80% of the time. Now that you determined a plugin is causing the issue, change the name of the plugin folder back to the original name ‘plugins’. Next, log into your WordPress Dashboard and go to plugins. What you will notice is that all of your plugins were deactivated when you changed the folder name. At this point, all you have to do is reactivate each plugin one at a time until you find the one that is causing the problem. When you find the plugin causing issues, I recommend just replacing it with another plugin that provides the same functionality, but is also compatible with your site. It is also important to remember that you should always keep your plugins and themes updated and always update to the latest version of WordPress (backup the site first!). Keeping everything up to date will the decrease the chances of plugins conflicting with each other or the site’s theme.
An issue with Code:
Were you modifying the php of a template or editing the functions.php file when the site went down? If so, that is likely the problem. As stated in the previous section, you should always have a backup of your site. If you were modifying one of your php templates of the
functions.php template when the site when down, you can simply upload the same template or
functions.php file from your backup. You can do this directly through FTP or through your CPanel. For best practice, you should use FTP, but doing it through your cpanel is usually ok for this as well. Depending on how much time and money you have invested in your site and the size of your business, I would also advise setting up a staging site so you can test these changes first before applying them to the live site. In other words, just make a subdomain and duplicate the live site. If your site’s name is www.example.com, then your staging site could simply be www.staging.example.com.
In order to minimize downtown, you should create a child theme of the parent theme you are working on. Once you do this, you can make all edits in the child themes’s
functions.php file. In the event that you make a mistake, you could always revert back to the parent theme of the site until you revise your mistakes in the child theme. For more on creating child themes, check out the WordPress Codex.
Cause Unknown-It’s time to wp-debug:
If you didn’t make any changes to your plugins or modify a template file, then the only viable option at this point is to completely give up and go live in a commune in the mountains of Colorado. You should also throw your computer out the window and curse the heavens. Alright, you don’t have to be so extreme, but it’s understandable if you are getting frustrated. We’ve all been there and I know I have at least a few times.
Fortunately, there is an easy and reliable solution that should be utilized if you are going to be managing a WordPress site. That is setting wp-debug in your
wp-config.php file to true. To do this, go into your public_html folder, but instead of going to wp-content, scroll down and look for the
wp-config.php file. This is the same file where you configure the database.
Once you open the
wp-config.php file, scroll down to the part that says wp-debug and change the part that says ‘false’ to ‘true’. When you return to your site, you should see some messages on the top of the screen that specifically tells you in which template the problem is occurring.
At this point, the best thing is to play around with the template where the issue resides. Again, make sure you have a backup of the site or at least that specific template before you modify the code. It may be an easy fix or it could take some time to figure out. However, you will at least know where the problem is occurring. There are plenty of free online support forms for WordPress where you can submit a question. Additionally, if you are using a paid theme, it will likely come with some sort of support in which you can submit a ticket.