The Menacing White Screen of Death with WordPress

by Jason Koertge on February 10, 2010 · 2 comments

in Blogging,PHPMYADMIN,Plugins,SQL,Wordpress Tips

Post image for The Menacing White Screen of Death with WordPress

If you’ve been working with WordPress for any length of time, I’m sure you’ve come across the menacing white screen of death.  Here’s how to fix it.

Recently I moved one of my blogs to a new server.  Everything went smoothly, the server environment was the same, the database imported correctly and when the name servers propagated, everything seemed in order.  Then the next day I typed up the url and hit enter just to check things out, and BAM! Nothing.

Right click > View Source Code > Nothing.  There was nothing being displayed.  Hmmm, so I type in my domain name/wp-admin.  Nothing again.  Shoot, I couldn’t even get logged into the back end.

So, fearing the worst, I check the files on the server.  Everything is there.  I check the database.  It looks normal. What to do next?  Well, if the site files are there, and the database seems normal, then the first place to start is to deactivate all the plugins.

I’ve experienced several white screens of death and every single time, they’ve had something to do with a buggy plugin.  I needed to deactivate them, but I had to do it through phpmyadmin because the back-end was just not accessible.

After a google search, I came across this nifty article on Perishable Press that provided one quick sql command that took all my worries away (it deactivates all the plugins in one quick, fell swoop).

So, here’s what you do.

Log into phpmyadmin

Start by logging into your server control panel and locate the phpmyadmin icon.  I use Hostmonster, and this is found under the sub-section called “Databases”.  It should be similar for you as well.  Click on it and a new window will come up that takes you right into the back end of your database.  Now, if you’ve never been here before, don’t be scared, it seems a little intimidating, but it won’t bite.  But you should be careful, you can screw up your whole site if you mess with the wrong thing.  Wow, was that contradictory?  NO PRESSURE!! ;-)

Find your database name

Once you’re in, on the left-hand side, you’ll find a list of all your databases (if you have multiple – I have like a million).  Find the database for your blog.  If you need help determining which one is tied to your blog, then you can just check in your wp-config file.  Either go into Dreamweaver, or open your wp-config file in a text editor and look at one of the first fields, it will have your database name.  When you’ve located your database name in the left hand sidebar, click on it – it will pull up all the tables in your database.

Run an SQL Query

Sounds cool, doesn’t it?  Yep, after this, you can say you’re a coder.  Well, not really, but who cares.  Along the top there are a series of tabs that read: Structure, SQL, Search, Query, Export, Import and Operations.  Click on the SQL tab.

When you click on the SQL tab, you’ll be taken to a page with a big white blank box.  Now, don’t freak out with all that white space, everything is functioning correctly here.  It’s within that white box that you’ll paste the following code:

SELECT * FROM wp_options WHERE option_name = ‘active_plugins’;

Once you paste that code into the box, click on the GO button.  This will pull up a table row that will have all your active plugins listed, it should only be one row and will look something like this:

sql_screenshot_wordpressClick the edit icon (hint: it looks like the pencil, right next to the radio button on the left).  The next screen, there will be a text area that will have a bunch of garble-dee-gook in it that will look something like this:

a:11:{i:0;s:31:”FeedBurner_FeedSmith_Plugin.php”;i:1;s:19:” akismet/akismet.php” ;i:2;s:19:”capsman/capsman.php”;i:3;s:36:”contact-form-7/wp-contact-form-7.php”;i:4;s:24:”flickr-tag/FlickrTag.php”;i:5;s:36:”google-sitemap-generator/sitemap.php”;i:6;s:47:”really-simple-captcha/really-simple-captcha.php”;i:7;s:15:”stats/stats.php”;i:8;s:35:”thesis-openhook/thesis-openhook.php”;i:9;s:37:”tinymce-advanced/tinymce-advanced.php”;i:10;s:20:”wordpress-mobile.php”;}

Select it all, cut it out, paste it in a fresh text document and hit GO in your SQL window. Viola, all your plugins will be deactivated.  Note: I say to paste it into a fresh text document out of a habit of never wanting to lose any code in case I need to go back.  There is no “undo” button with this process, but if you keep the code, at least you have a way to go back if you need to.

From here, go back to www.yourdomain.com/wp-admin and log in.  Go to your plugins page and one-by-one, reactivate each plugin until you get an issue and you’ve found your bug.

The plugin that was causing all the fuss for me was Contact Form 7, which needed an upgrade.  I upgraded it, and the problem was gone!

Post in the comments below your experiences with the menacing White Screen of Death and tell us about your solutions.

{ 2 comments… read them below or add one }

1 Felix February 24, 2010 at 3:36 pm

I do get a white screen very often after submitting a comment. Nothing happens and the comment does never show up. Do you have any advice on that? Is that linked to the white screen of death as well or a completely different matter? I’m not very familiar with the technical aspects yet. Thanks for your help

2 Tagnu March 6, 2010 at 2:11 am

Hi,
Thanks for the article.
Helped me isolate buddypress installation errors.

Leave a Comment

Previous post:

Next post: