I got the Wordpress White Screen of Death

How I Solved My Wordpress White Screen of Death

December 31, 2009

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: http://www.colinmcnulty.com/blog/2008/07/08/solution-to-wordpress-blank-screen-of-death/. 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: http://www.smartbloggerz.com/2009/12/wordpress-2-9-carmen-whats-new-problems-you-could-face/. 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 http://wordpress.org/support/topic/343128 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.

Summary

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!

{ 1 trackback }

How I Solved My Wordpress White Screen of Death | Wordpress Marketing
January 1, 2010 at 11:32 am

{ 9 comments… read them below or add one }

Typhoon January 1, 2010 at 3:57 am

Thanks amanda for linking up my post. I am glad that it helped yo in solving the mysterious wp 2.9 error which majority of pople will be getting on upgrading. I hope it also helps others solving same kind of 2.9 upgrade related prob.

Amanda January 1, 2010 at 5:25 pm

Hi Typhoon, Thanks for writing your post about the error. I don’t know what I would have done without it and I hope others find it useful. Cheers, Amanda

markus January 3, 2010 at 2:45 am

I also was just working on the functions.php file and i got the white screen. I noticed the extra line at the end and i also deleted it. But i still get the white screen…i dont know what else to do. Im going nuts over here…

Amanda January 3, 2010 at 4:01 pm

Hey Markus, So sorry to hear you saw the white screen too! You’re working in Thesis, right? Did you give a thorough check for that blank line in all the files in your /thesis folder?

Rich January 28, 2010 at 2:41 am

I didn’t think fiddling with my theme’s PHP files (as opposed the WP ones) was going to cause any major problem…never did before. Well, that is until I left a $%&*ing extra line anyway earlier today and got the blank screen. This post saved me from days of frustration, no doubt. Serves me right anyway for trying to fix what wasn’t broken, eh?

Thanks!

Amanda January 28, 2010 at 3:17 am

Glad this post was helpful!!! thanks for letting me know :)

NW Skyles February 11, 2010 at 3:52 pm

This post is the single most helpful thing I’ve seen on the internet. I’ve was messing with my functions.php and though I deleted what I had added (after I started getting the white screen only on submitting posts or theme edits), I had failed to take out the extra line… Then everything went south… I was replacing files, backing up, getting ready for the dreaded reinstall and then your post popped up on google and I took a deep breathe and decided to read through it.

Sure enough, I took out one return out of my functions.php and everything snapped back into place.

Thank You

Amanda February 11, 2010 at 4:02 pm

i’m so glad it was helpful, and thank you for the nice note! i’m also super-glad you got your blog back up and running. :-)

NW Skyles February 11, 2010 at 6:06 pm

No prob, sorry for the atrocious grammer… I blame the WSOD trauma. Strangely enough, you may be interested in one of my projects. It’s a soccer documentary called “Pelada.” It’s about two soccer players who travel the globe looking for pick up matches.

http://www.nicholaswskyles.com/blog/?tag=pelada

Leave a Comment

Previous post: How I use the Voice Memos app on my iPhone to create audio interviews

Next post: Gearing Up for the WPS Draft