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!
My blog, Soccer Science: The Neurotic Genius of Soccer in the Digital Age, takes a look at the new media technologies that are revolutionizing the way we see the beautiful game. I'm a web geek, former college coach, industry professional and sports fan.
{ 20 comments… read them below or add one }
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.
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
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…
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?
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!
Glad this post was helpful!!! thanks for letting me know :)
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
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. :-)
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
Amanda, thanks so much for posting this. Who knew that a blank line in the stupid functions.php file could take down the entire WP install, which is what was causing my “white screen of death – guess I’ll just have to slash my wrists now” problem. Thanks so much! Us geeks are lucky there are persistent girl-geeks like you out there.
I haven’t gotten the white screen but a few days ago I got a 500 Internal Server Error. Then all pages but my homepage disappeared. When you go to them (ie, http://www.thelunaticltd.com/about) it gives me a Page Not Found error. I’ve tried creating & publishing new pages but they aren’t found. I’m hoping that a reinstall of WP will fix it. I’ll use your links for more info. Thanks for the great post.
@Greg Weber – Best. Compliment. Ever. = “persistent girl-geek”. Glad you got your problem solved :-)
@Rich, that sounds bad, sorry. I wish I could help but luckily I haven’t gotten a 500 error – wouldn’t that mean there’s a problem w/ your webserver? Not sure a WP reinstall will solve that…? But let me know if it does!
@NW Skyles thanks for the link!
Thanks for saving me 2 days of work! The exact Wordpress error message happened to me a few minutes ago. Your first step made me think to reload the original Thesis 1.7 comments.php file I was working on – and boom it restored my WP-Admin panel.
Great article…Rich
I LOVE YOU AND MY GIRLFRIEND JUST GAVE ME PERMISSION.
If you were here we’d make you Salmon for dinner.
I just started my new job and this monster ‘Blank White Screen of Death’
over took my work days. But nomore Thank you Jesus for Amanda.
Friends fa sho.
~Carl
@Rich so happy you were able to solve the issue! @Carl I love you too ;-* Salmon is my favorite – give your girlfriend my love. Cheers! AV
Thank you. I actually did have blank spaces after the close php tag in my functions.php. Who’da thought?
Glad you were able to find the problem!!!
Thank you , I was freaking out until I found your blog
Had a blank space in my function.php
Glad this blog helped you! I can’t believe how annoying that one little space can be. Thanks for letting me know :)
{ 3 trackbacks }