How I Solved My WordPress White Screen of Death

There are two types of WordPress blog owners: Those that have seen the white screen of death, and those that will. And once you’ve seen it, plan for a full adventure to find the cause.

Summary of my Troubles

  • I upgraded to WordPress 2.9 and updated my Thesis design on the same day. Bad choice.
  • My admin pages stopped working. At first they’d render spotty, but soon I got the total white screen of death. I felt fear for what was to come.
  • I spent two days of my holiday vacation completed engrossed in my FTP client and CPanel, trying to figure out wtf happened. Awesome.
  • I put my computer down and walked away, giving it glances of malace whenever the shiny silver reflection would catch my eye.
  • I resolved to solve the issue today and set aside hours for the cause.
  • I changed one line of code and it worked.

How it Began

I did an automatic upgrade to WordPress 2.9 on December 21, 2009, and everything seemed to be fine. On that same day, I changed my Thesis layout and design, tinkering with just about every file in the wp-themes/thesis folder. Soon, admin pages would turn up blank after posting or approving comments. I walked away and figured I’d sort it out later.

Unfortunately when later came, I couldn’t log in at all. The occasional blank screen had officially turned into the White Screen of Death and while I could see the blog/wp-login.php page, I couldn’t access my administrative functions at all. Hence, off to the races with Google, my FTP client and CPanel to find the cause. I’m posting this blog so that anybody else who runs into this might have a starting point and a few good references.

Finding the Solve: Step 1 – Locating the blank line in the code

I started here: After reading this post, I figured the problem could be an extra blank line at the end of the code following the ?> character, that somehow appeared in during my upgrade. I went through the wp-config.php, wp-settings.php and each .php document in my /blog/wp-admin folder to find the culprit. No luck.

Finding the Solve: Step 2 – Reinstalling WordPress 2.9, reverting back to 2.8.6

So then I found this blog post: I decided to do a full manual re-install of my WordPress /wp-admin and /wp-includes folders, along with all the various .php files the /blog directory. First, I reinstalled WordPress 2.9 and that didn’t seem to help. Then, I decided to revert back to WordPress 2.8.6. That didn’t work either.

Finding the Solve: Step 3 – Uninstall & Reinstall Plugins

Okay, next option: Plugins. I realized I hadn’t uninstalled my Plugins before the upgrade to 2.9. So lazy of me, I’ll never do this again – The 5 seconds I saved by not uninstalling them was not worth the 5 hours of Plugin torture that would follow. This forum lead me to believe that if I just uninstalled my Plugins and then reinstall them one-by-one I would probably be able to find the one that was causing the error. I still don’t know how to uninstall my plugins in the CPanel, so instead I moved the contents of the plugins folder completely. Then I added each one back one by one. That didn’t help, and the amount of spam that I accumulated was incomprehensible after unistalling Akismet.

Finding the Solve: Step 4 – Regroup

At this point I had burned through two entire days of my holiday vacation, so I decided to put it to rest. Looking back, this is the best thing I could have done and highly recommend doing do if you’re mired in the muck of code, get out! Take a break. Go for a walk.

Finding the Solve: Step 5 – Dig into my /wp-content folder and /themes/thesis

After giving my computer dirty looks all day long yesterday, I finally picked it up this morning and decided to give it another go. For the first time, I thought about the problem in a different light. Instead of a function of the Upgrade, perhaps my troubles were a result of a faulty line of code in my new Thesis /custom_functions.php file, which I had just edited before all the craziness started. I went to my Cpanel and opened the file, found a blank line of code following the ?> character. I deleted that blank line… and voila! My blog works again.


So, in sum, the solution was in fact what Colin McNulty described in the first blog post I referenced. However, it was a coding error in my Thesis custom_functions.php file (which had recently edited). I did go back into my original /custom_functions.php file and take full responsibility for the two extra lines of blank code after the ?> character, apparently I left them in there when I uploaded through my FTP clent. I can hardly believe such a little detail has caused so much wasted time.

But out of the frustration, I’ve definitely learned a couple important points.

  • I will back up my WordPress files before upgrading from now on.
  • I will uninstall my plugins before upgrading from now on.
  • I will not perform multiple back-end upgrades/redesigns on the same day.
  • I will double check every page I upload for erroneous code.

So I’m still on WordPress 2.8.6 as I’m typing this post, and I’m sure I’ll bounce over to 2.9 eventually. But for now, Happy New Year!

62 thoughts on “How I Solved My WordPress White Screen of Death

  1. I just had this problem. It turned out to be because I had too many comments loaded on the page. I limited the comments to 50 per page and then everything worked again.

  2. Thanks, this post saved my day as well. I knew it was something with functions.php causing my white screen but never got my eyes on the two blank lines at the end ;-)

  3. OMG! am having this problem. but I CAN’T login!!! I don’t get the login box via domain/wp-admin OR domain/wp-login.php… OMG!!! PLEASE SOMEONE HELP ME!

  4. For what it’s worth, after 3 years, step 5 worked wonders. Before I read your post I repeated steps 1-4. It was on the umpteenth step 4 that I read step 5. Immediately solved the problem: white space in functions.php.

    Thanks a lot – really happy!

  5. You owe a big Thanks! I would like to point out that it can also happen due to a false permission set to wp-content.

  6. Hi,

    This is a good piece of know how for all wp beginners.
    I also would like to point out here that it can happen due to incorrect permission set to wp-content folder as well.

  7. Another alternative to the above if your site still isn’t up and running.

    I tried tonnes of stuff, looked all over the web after getting the white screen. I finally got my site back up after replacing all of the wordpress files and folder EXCEPT the wp-content, loaded up right away and problem solved with my complete site and build back to how it was before the crash.

  8. Hello,

    I found on google lots of those mistake, and everything I do white screen is stll there :(

    BUT … after reading your article I started to investigate .php files I changed on theme I purchased and…
    YEAH…. i found one blank space in shortcodes.php because I changed them … SO I RESOLVED this issue…. Thanks MAN!

  9. Hi,

    Thank you for your post and I’m following your instrution.

    My problem is that I can not found where is custom_functions.php file in the Theme that I’m using.
    (I’m not using Thesis Theme now)

    In that case, How to fix the bugs? or How to find out where is custom_functions.php file?

    Thank you in advance.

  10. For me, it wasn’t a space, but when you said, “For the first time, ——- appended ———-which I had just edited before all the craziness started”

    I immediately had a direction for troubleshooting and in 3 minutes, a solution.


Leave a Reply

Your email address will not be published. Required fields are marked *