08.07.08
Solution to Wordpress Blank Screen of Death
As I posted last week, getting my blog hacked forced a wordpress upgrade to v2.5.1 however it also caused a problem I had previously been unaware of, the Wordpress Blank Screen of Death. This is basically where under some circumstances, you get a blank plain white screen instead of the page you were looking for. In my case, I was completely locked out of the admin screens and could do nothing with the blog apart from post comments!
This post is going to take you on a journey, one that starts with following standard debugging techniques that I’ve learned from years of experience in the IT industry and ends in a discovery so surprising, it’s made me question the fundamental quality of the whole blogging phenomena that is Wordpress (Wordpress is the blogging software this crossfit blog uses and is arguably one of the most popular). I started off as anyone should when faced with a new and unfamiliar problem, by doing some research:
What I found was that this appears to be a common Wordpress problem suffered by many bloggers and can arise in many possible situations e.g.:
- After writing a comment and clicking Submit.
- Accessing any of the main blog screens.
- Accessing any of the administrator screens.
- After *doing* something in the administrator screens.
During the upgrade, I noticed I was suffering from (4) above. I could access the admin pages no problem, but whenever I tried to do anything adminy I’d get the Blank Screen of Death e.g. change a plugin setting or write a post or change anything. The action I was performing worked ok, but I’d have to hit the back button and do an F5 Refresh to see the results of it. At the time I figured I’d deal with it later.
It was made worse because there were no error messages: No errors on the wordpress white screen of course; nothing in the main wordpress error.log; nothing in the plugin error log; and nothing in the webserver apache error log. And in the absence of any information it’s a tough problem to debug. However, with my advanced level Google Foo, I was pretty confident of finding the answer. I did in the end, but it took me hours!
Here are all the causes and working solutions I found on the net that others have specified:
- A partially complete upgrade – Solution: Re-upload the upgrade files.
- FTP Client making a mess of the upgrade – Solution: Get a better FTP client and re-upload the upgrade files.
- Something failed running /wp-admin/upgrade.php upgrade script – Solution: Find out what failed (check logs), fix it and re-upgrade.
- Incompatible Plugin Enabled – Solution: Disable all plugins, then add them back one at a time to see which one causes the problem.
- Adding the new define(‘SECRET_KEY’,… parameter into wp-config.php – Solution: Don’t put it at the end of your file, put it before the line that says /* That’s all, stop editing! Happy blogging. */
Working down this list posed a problem: How could I disable the plugins without access to the admin screens?!? In the end I had to manually hack the MySQL database directly via the back end. In short, here’s what I did:
- Accessed my webserver admin screens, cPanel in this case.
- Accessed the phpMyAdmin MySQL user interface.
- Browse the wp_options table.
- Find the field called: active_plugins.
- If you just want to look without the risk of cocking it up, here’s the SQL you need:
- SELECT option_value FROM wp_options WHERE option_name = ‘active_plugins’ LIMIT 1;
- First things first before you go fiddling: BACK UP THE VALUE OF THIS FIELD by copying to a text file on your PC.
- Then either us phpMyAdmin to blank the value of the active_plugins field, or use this SQL:
- UPDATE wp_options SET option_value = ” WHERE option_name = ‘active_plugins’;
- Just to be clear here, if you don’t know what you’re doing, then don’t do it! I’m not responsible for you messing up your blog even more. You should have regular backups and have proven to yourself that they work and you are competent enough to restore from those backups.
Anyway, that will disable all your plugins… great. Just one problem: it didn’t fix my Blank Screen problem!
I’ll cut a long story short, as it did take me another hour or 2 to finally find the solution. Now what I’m about to say is a complete shocker to me. As an experienced IT person, someone who has been messing around with and programming computers and working on IT projects in every possible role up to IT Director for over a decade, I am completely dumb founded by what I’m about to describe, because how the human race has got to 2008 with all the technologically related advances we have made, and yet still introduce a hugely powerful and popular program like WordPress, that is brought to it’s knees by the most innocuous of things… it’s just completely beyond me.
Anyway here is the answer: it lies in the wp-config.php file, this is the file where you set your database password etc (so you’ll forgive me for not using my own real one.
). This is the example file that comes with the installation:
— File Starts —
<?php
// ** MySQL settings ** //
define(‘DB_NAME’, ‘putyourdbnamehere’); // The name of the database
define(‘DB_USER’, ‘usernamehere’); // Your MySQL username
define(‘DB_PASSWORD’, ‘yourpasswordhere’); // …and password
define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value
define(‘DB_CHARSET’, ‘utf8′);
define(‘DB_COLLATE’, ”);// Change SECRET_KEY to a unique phrase. You won’t have to remember it later,
// so make it long and complicated. You can visit http://api.wordpress.org/secret-key/1.0/
// to get a secret key generated for you, or just make something up.
define(‘SECRET_KEY’, ‘put your unique phrase here’); // Change this to a unique phrase.// You can have multiple installations in one database if you give each a unique prefix
$table_prefix = ‘wp_’; // Only numbers, letters, and underscores please!// Change this to localize WordPress. A corresponding MO file for the
// chosen language must be installed to wp-content/languages.
// For example, install de.mo to wp-content/languages and set WPLANG to ‘de’
// to enable German language support.
define (‘WPLANG’, ”);/* That’s all, stop editing! Happy blogging. */
define(‘ABSPATH’, dirname(__FILE__).’/');
require_once(ABSPATH.’wp-settings.php’);
?>
— File Ends —
That is a perfectly fine, normal and working wp-config.php. Now I’m going to show you a broken one. One so terribly horrendously broken, that it causes you to be locked out of your workdpress blog for half a week and lose 1/2 a day trying to solve it. See if you can spot the difference:
— File Starts —
<?php
// ** MySQL settings ** //
define(‘DB_NAME’, ‘putyourdbnamehere’); // The name of the database
define(‘DB_USER’, ‘usernamehere’); // Your MySQL username
define(‘DB_PASSWORD’, ‘yourpasswordhere’); // …and password
define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value
define(‘DB_CHARSET’, ‘utf8′);
define(‘DB_COLLATE’, ”);// Change SECRET_KEY to a unique phrase. You won’t have to remember it later,
// so make it long and complicated. You can visit http://api.wordpress.org/secret-key/1.0/
// to get a secret key generated for you, or just make something up.
define(‘SECRET_KEY’, ‘put your unique phrase here’); // Change this to a unique phrase.// You can have multiple installations in one database if you give each a unique prefix
$table_prefix = ‘wp_’; // Only numbers, letters, and underscores please!// Change this to localize WordPress. A corresponding MO file for the
// chosen language must be installed to wp-content/languages.
// For example, install de.mo to wp-content/languages and set WPLANG to ‘de’
// to enable German language support.
define (‘WPLANG’, ”);/* That’s all, stop editing! Happy blogging. */
define(‘ABSPATH’, dirname(__FILE__).’/');
require_once(ABSPATH.’wp-settings.php’);
?>— File Ends —
What do you think, can you see it the mistake that breaks the whole blog? No? Go back and look closely…
Still no? Ok ok, I’ll give it to you, here’s the problem:
What? You can’t see that either? Let me show it to you again, look carefully this time:
You getting it yet? Yep, it’s an empty line. That’s all it is. 1 single solitary NewLine at the bottom off the file, right after that ?> a Carriage Return & Line Feed in programmers speak. That’s it. You hit the Enter key in one wrong place and the whole pack of cards comes tumbling down! Shocking, just shocking. Let me be crystal clear, it’s this bit here:
?>
— File Ends —
Now of course, the Analyst in me wants to know how this happened and I’ll tell you. The issue was the the new define(‘SECRET_KEY’… entry I mentioned before. That should have been my warning, because when I was following the upgrade instructions, they don’t tell you where to put it, so naturally I first put it at the end of the file…. yep you guessed it: AFTER the ?> . I realise now of course that was stupid and it didn’t work. What was the symptom of it not working? You guessed it: the Wordpress Blank Screen of Death.
But when I moved it to the correct place, I was still sporadically getting problems, then I commented the line out and basically with all the changes I made I seemed to have got myself into the situation where I was getting the problem, but only half the time. I reckon the currently open admin session I had going was probably masking half of the issue from me. But in putting it at the end of the wp-config file and then moving it, I must have left behind an empty line. How silly of me! So just make sure you have no extraneous characters after the ?> I’d recommend checking for those evil and nefarious spaces too.
Anyway, that’s the fix and probably the most comprehensive study of getting wordpress blank screens anywhere on the net. If you find this post useful, please consider linking to this post from your blog, it will help others find this article who may have the same problem.
Cheers.
EDIT: Austin in the comments has also reported that: “This can also happen in your themes functions file. Make sure you do not have any “extra” returns after your last ?>”
Diane Vigil said,
July 8, 2008 at 11:49 am
Yep. That falls under the “stuff happens” scenario. Been there.
Roanoke VA real estate said,
July 8, 2008 at 6:54 pm
Dude, bless you. You just saved me a lot of friggin hassle. I guess my google foo helped me fine you! Cheers and many thanks!
Charco said,
July 9, 2008 at 12:49 pm
bloody brilliant – I just spent the best half of eight hours trying to sort this out. I’ve been in and out of the database, up and down the MySQL and permissions ladder…
All I can say is THANK YOU VERY MUCH
Kathy said,
July 10, 2008 at 12:50 am
I’m getting the blank screen problems after editing/managing/creating a ‘page’ (but I can post a regular entry just fine) – but I’ve never done the secret key bit… but the repair is usually replacing the wp-config.php file just as you describe. I’ll watch for an extra empty line, but it doesn’t make any sense to me. Great work, though!
Colin McNulty said,
July 11, 2008 at 7:00 am
> STOP SPAMMING THE FORUMS
Dude, when I was trying to find the solution to my own problem, I went through the Wordpress forums in detail and found many MANY people with the same problem and hardly a soul helping them. I resolved to go back when I was done and post replies to all the people that needed help but hadn’t received it.
If I was spamming the forums I’m sorry, but I wouldn’t have needed to if so many people hadn’t had the same problem and not received help from anyone else.
jasper said,
July 11, 2008 at 7:44 am
man i have this same problem at my website..
http://www.maddecent.com
if anyone can help us solve it we can compensate
thanks!
jasper.goggins@gmail.com;
Alex said,
July 12, 2008 at 11:30 pm
Hiya,
I have the same problem, but after first install… not much help from wordpress support forum (instead of a reply, one of their lovely moderators closed my thread because he’d mistaken me for another user).
I had a look for that infamous last line and sure enough, it was there. Removed it, still no joy.
Any ideas where the bug could be? I use Dreamweaver’s built in ftp.
Thank you!
Colin McNulty said,
July 13, 2008 at 8:51 am
Jasper and Alex, I would suggest a reinstall / re-upgrade process. There are many things that could be wrong, just start again and work through slowly.
Lee said,
July 15, 2008 at 4:49 am
I’m having this problem when I try to run install.php. I have tried completely reinstalling from a fresh installation without any luck (two or theree times). I have also tried your suggestion, but it didn’t work for me. Also, I have made the following observations:
1) The original wp-config-sample.php file has the extra carriage return at the end! So this is very unlikely to be the real cause of the problem, and as I said, it didn’t work for me.
2) I have PHP error logging enabled, and I got the following error each time I loaded install.php:
PHP Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in [URL removed for security reasons]/wp-admin/includes/media.php on line 154
Hence, the problem would actually appear to be with /includes/media.php.
Interestingly, line 154 is blank – just a carriage return. I’m going to try removing it and see what happens. Or maybe there’s supposed to be an “else” or something there. Any PHP experts here?
Anyway, it appears there is some kind of error in the 2.5.1 version of /includes/media.php.
Lee said,
July 15, 2008 at 8:58 am
Well, I’ve been messing around with 2.5, 2.5.1 and the just released 2.6, and no matter what I do, when I try to install any of them, I get the same blank screen and the same PHP error from /wp-admin/includes/media.php. The only difference with 2.6 is that the error now occurs on line 197 (I’ve discovered that my text editor counts the lines differently from WP, so I’m no longer sure which line this actually is).
However, I noticed 2.3.3 and earlier didn’t have this file, so I decided to try installing it. Voila! It works!
So I was obviously installing it correctly, but there is clearly a serious bug in the code of /wp-admin/includes/media.php (from WordPress 2.5 upwards).
As this file relates to the new admin interface, it explains why some people are getting blank admin screens after upgrading to 2.5 and later, while other people (like me) simply can’t install it in the first place.
I am going to need some very serious convincing that this bug has been fixed before I even consider “upgrading” to a newer WordPress version.
2.3.3 has the extra carriage return at the end of wp-config-sample.php BTW, so I am quite convinced tha this is not the real cause of this issue.
Colin McNulty said,
July 15, 2008 at 7:28 pm
The plot thickens…
To be honest there are always going to be sporadic problems with an install base as large as WordPress, but the lack of error reporting and handling is a shame.
Laowai Chinese 老外中文 » Blog Archive » Sorry for the white out said,
July 17, 2008 at 11:30 pm
[...] you tried to visit in the last 48 hours or so, you would have seen nothing on this site but the White Screen of Death. I just got it sorted out by upgrading to WordPress 2.6, but I have a feeling the addition of the [...]
Michael Liu said,
July 18, 2008 at 9:07 am
Hey Man, You really has done something great, it works.
Simon said,
July 18, 2008 at 6:09 pm
I had my share of blank page distraught.
See my write-up at http://simos.info/blog/archives/706
John Miller said,
July 18, 2008 at 8:26 pm
Not working for me. My wp-config.php file is fine – no extra space, everytime I try to post and click submit, it goes to the …/post.php file and locks up at a blank screen. I thought that maybe is was a chmod permission problem. I’m about ready to just uninstall/reinstall.
Ap said,
July 18, 2008 at 9:54 pm
For what it’s worth: try to set your theme to the base theme. Worked in my case.
hanjra said,
July 18, 2008 at 11:28 pm
Hi, can you please tell me how to deactivate all the plugins in wordpress 2.6. I dont see the above mentioned string (command) in the wp_options table.
My problem is that whenever i try to login, i get blankscreen. I cant do anything to get in. please help me.
hanjra said,
July 19, 2008 at 12:00 am
Thanks god, the problem has been resolved. it was all due to a plugin. I deleted the recently installed plugins using ftp client and now i can login and get into dashbaord.
I am telling this for others help.
Colin McNulty said,
July 20, 2008 at 6:38 am
Plugins are often causes of this problem it seems. One of the things I tried was to move all my plugins out of my plugin folder via ftp.
Dan McComb said,
July 20, 2008 at 11:39 pm
Thank you! I lost about an hour trying to figure this bastard out, and after removing the extraneous line break in the wp-config file, it worked all dreamy. You rock.
Marty Martin said,
July 22, 2008 at 4:17 pm
I just started having this problem again today and I notice now that in FTPing to the site, the file has been chown’d to 99 99 instead of the correct owner/group of user1/group1
I wonder if there’s a way to look in the logs and find out what script did that and track the problem that way?
The Book of Brian » Blog Archive » We lived through the dreaded White Screen of Death said,
July 27, 2008 at 4:20 am
[...] as pointed out by Colin McNulty in amazing detail over at his blog (http://www.colinmcnulty.com/blog/2008/07/08/solution-to-wordpress-blank-screen-of-death/), the automated Wordpress upgrade.php script appears to add an extra line in the wp-config.php [...]
Howe said,
August 1, 2008 at 4:05 am
You have a page this size for explaining it was a blank line ?
You must have plenty of time for blogging.
This was a bug, fat waste of time, and of course it didn’t help at all.
The Blog Idea said,
August 1, 2008 at 8:07 am
In my case only a few of the user blogs get blanked. Please suggest.
The Blog Idea said,
August 1, 2008 at 8:14 am
If you click on some of the links to the user created blogs, the pages appear blank.
Kyle said,
August 1, 2008 at 12:24 pm
Thanks for the effort. Reloading all of the files worked like a charm.
WordPress 2.6 upgrade issues and fixes - Adwords articles said,
August 1, 2008 at 12:37 pm
[...] Blog main and admin screens are all white following the upgrade [...]
The Blog Idea said,
August 1, 2008 at 9:24 pm
My problem of blank pages was solved by logging in as admin on my wordpress mu blog and clciking on “upgrade”
Colin McNulty said,
August 2, 2008 at 6:08 am
> Howe said,
> You have a page this size for explaining it was a blank line ?
> You must have plenty of time for blogging.
Not really, but I put effort into subjects that either I care about or bother my greatly. Losing access to my blogs admin screens bothered me greatly.
I also discovered that there were loads of other people out there with the same problem and helping others solve the same problem I’ve solved, is something I care about.
Bengt said,
August 2, 2008 at 9:20 pm
I got blank screens on some of my blogs after upgrading but not on others. It worked with the standard themes like Classic or Sandbox but not with my own themes. My problem turned out to be caused by some extra spaces in those themes functions-files.
Tim said,
August 10, 2008 at 3:22 am
Thank you. Thank you. Thank you. I would have never discovered the problem.
Steve James said,
August 10, 2008 at 3:32 pm
I had the blank screen after comment submit problem. No errors reported, no logs, nothing.
Above, Ap said set the theme back to Default. Out of desperation, I did so, but didn’t expect this to help. What’s the theme got to do with submitting a comment? Well it worked!
I was using the Orange Techno theme; no plugins, fresh 2.6 install. Geesh. Wordpress is a breeze to set-up but the diagnostics are pants.
Niaomi said,
August 13, 2008 at 9:26 pm
I’ve checked my config file and it doen’t have a gap, it isn’t broken. I’ve also delated all my plugins but my screen is still blank after I make changes.
Any help appreciated.
I am so design orientated, I cannot bare this!
Colin McNulty said,
August 14, 2008 at 5:24 pm
As you will have discovered Niaomi, there are many reasons for the Word Press Blank Screen of Death, you just have to keep taking things out till it suddenly starts working.
Sam Hooker said,
August 19, 2008 at 9:15 pm
Pardon my saying so, but isn’t the issue you’re describing more of an issue with the PHP interpreter (Apache mod_php, in your case), rather than the codebase? I mean, it seems like the problem is PHP bailing without sufficient error handling (i.e., posting a message in well-formed HTML to the browser). Sure, it’s sloppy code if the WP upgrade script is appending a spurious newline to the config file, but the greater failing here is that of the interpreter. IMPO, anyway…
Jeremy said,
August 19, 2008 at 9:25 pm
Hi Colin,
Thanks for your write-up. I read your post, and seeing as how you noted that cleaning up the active_plugins field didn’t fix things, I skipped it. Silly me. My problem was IN that active_plugins field. My host actually helped pinpoint it. Not sure how it happened, but the last plugin folder contained in the serialized list had an address that looked like this: ‘../../../../../[about 20 times]../tmpZnlkjP/something…’ …It looked like junk.
I carefully reviewed the entire contents of the field in a text editor, and stripped out that reference. Once I had done so, voilà! My site was back online again.
So if someone else is reading this,
DON’T SKIP DISABLING ACTIVE PLUGINS VIA THIS METHOD OR ANOTHER.
-Jeremy
Sam Hooker said,
August 19, 2008 at 9:48 pm
Colin,
I appreciate your posting, too. Unfortunately, in trying to troubleshoot my upgrade to 2.6.1, the issue was the fact that I hadn’t copied over an alternate theme (into …/wp-content/themes). If folks get this far in your process and are still at a loss, I’d encourage them to look into whether they’ve brought over any alternative themes that may have been in use. Thanks to the folks posting to http://mu.wordpress.org/forums/topic.php?id=9168
Cheers,
-sth
Anthony said,
August 20, 2008 at 10:38 am
My problem started when I installed a few wordpress themes and started testing the look and feel. I lost everything – admin panel- the lot. I cant rem which one caused the blank screen but when I went into the themes folder I just deleted all of the themes bar the default and all was restored.
Jusy incase that helps anyone….
Mel said,
September 1, 2008 at 5:54 pm
Re-upload wp-includes foler and that will fix the blank admin page problem. I haven’t narrowed it down to which file is causing the problem but I know 100% it’s inside the wp-includes folder.
James said,
September 5, 2008 at 10:43 pm
Thank you so much!! My issue was simple, I just activated a wordpress plugin that was not compatible, so I had to go into my FTP client and delete it. I was freaking out. The whole reason I was working on one of my older blogs was because an article got picked up by stumbleupon and I was trying to capitalize. I jump on there and I still have Wordpress 2.1 running. I want to get it up to par so I need to update. I try starting out with one of those one-click back-up plugins and boom, everything is white. My site is a blank screen, my admin is a blank screen, everything.
Luckily I googled “wordpress blog sunddenly blank screen” and I found this up near the top. Your blog gave me a solution to my problem in less than the standard 96 seconds most readers spend on a page, and for that I thank you!!!
Colin McNulty said,
September 9, 2008 at 8:24 pm
Thanks for the comments guys & girls, it’s nice to know this post has helped people. If any of you fancy giving me a back link, feel free.
Aaron said,
September 11, 2008 at 5:14 pm
Hello Colin,
Great article. A few questions:
We are having similar problems with http://www.marksdailyapple.com. White screen of death at seemingly random times. Some browsers show the site while others don’t at all (WSOD) and comments don’t work. And here is the kicker it isn’t the same browser on different computers that it doesn’t work on. For example, it won’t display on FF3 at work but will on my computer at home.
In our panic effort to fix the problem the first time we re-uploaded all the wp-includes files. This fixed the problem temporarily (for about a week). Since then we have narrowed it down to a single file – kses.php in wp-includes. That is, if we have the WSOD and re-upload that single file the site functions normally again… for awhile.
We have the latest version of WP and and about a dozen different plug-ins.
Also, and this may be the most relevant bit of info, we recently moved our site to a new host. Our last server was hacked. The hackers were able to get into our files, add hidden text, and also redirect our URLs to spam (mostly porn) sites in search results. This problem was, ostensibly, fixed by our developers but with our trust in our old server lost we jumped ship. Ever since then the WSOD problem has been happening (started about 3 or 4 weeks ago and has happened about a half dozen times now).
Our WP developers can’t seem to find a solution. They’ve thought it is some weird cache problem. They are now telling us the root of the problem lies with our host.
Any thoughts, suggestions or help would be appreciated.
Colin McNulty said,
September 11, 2008 at 9:25 pm
Hmmm that does seem to be a mystery.
Aaron said,
September 15, 2008 at 5:16 pm
Update:
This was our problem –
Logic on the timing of the issue seems to point to a problem with something on the server. In doing some more research into your new server’s config, there is a PHP optimizer called eAccelerator that seems to be causing segfaults with wordpress. Here is the bug report:
http://eaccelerator.net/ticket/216
You may want to ask the host to check into this and either disable it or find a work around. This is a high probability due to the eAccelerator bug with the kses.php file.
We disabled eaccelerator and the problem has stopped.
Cheers!
Colin McNulty said,
September 15, 2008 at 7:23 pm
Wow, that’s an esoteric cause indeed!
Wordpress 2.6 Upgrade - Tasks to Perform to Avoid Problems | Earn Extra Money said,
September 16, 2008 at 6:45 am
[...] “I get a white screen when I log into wordpress after upgrade” and the first result was Colin McNulty.com:Cossfit Exercise, Workout and Zone Diet Blog. I wondered what sort of help I’d receive from this blog considering the title. Colin has [...]
tenkeboks » Nytt domenenavn: tenkeboks.com said,
September 30, 2008 at 7:09 am
[...] å flytte en WordPress blog til et nytt domene! Etter tre dager med &!#¤$?! fant jeg omsider hjelp til å stable blogen på bena igjen. Så nå bør du #!¤#&% meg rålike det du [...]
Bjørn said,
October 22, 2008 at 8:41 pm
Hello! i tried WP for the first time today, after installing i can manage my page in dashboard, but my page is blank. non of the above helped me:S
Lee Kemp said,
October 25, 2008 at 6:32 pm
I’m getting the blank screen but i’m not upgrading, i’m simply failing miserably at my first installation. I’ve checked for the blank line and i’ve tried uploading with a different ftp client.
Any help much appreciated.
sharon said,
November 22, 2008 at 8:54 am
There are other reasons this can happen that are not WP’s fault, you know. The white screen can be a sign that you’re running out of PHP memory. That’s something that will appear in your server logs, and it basically means you have a cheap web host that is setting the PHP memory limit very low. After some messing around I managed to get an existing installation to upgrade. But I can’t install a new WP database. I can’t install Mediawiki either: same blank screen. I’ve also had problems with a different PHP-based program at the same site. The ’support’ staff tell me there’s nothing wrong. (And the crucial difference between the support at my web host and the WP support is that I pay my host.) Looks like I’ll be moving to a new web host in the near future.
PT-LawMom said,
December 6, 2008 at 6:40 am
You are awesome. Thank you SOOOOOO much!!!
Wordpress leere weiße Seite nach Installation - Digitale Probleme said,
December 17, 2008 at 2:07 pm
[...] es leider viele, häufig liegt es wohl aber an fehlerhaften Plugins. Weitere Ursachen sind hier und hier [...]
MarkS said,
December 31, 2008 at 2:38 pm
You saved my blog. Thanks!
Fort Lauderdale SEO said,
January 13, 2009 at 10:39 pm
I have had this problem for a very long time … The thing is … I have the exact same WP theme and files on other servers without a hitch … however, the admin area gets whiteouts for various reasons when I have more than one plug-in activated … I have heard the “canned” solution a hundred times
“upgrade WordPress”
It does not help … I have no idea why the theme would work fine on one server and completely whites out on another …
I have no idea why this issue persists after trying every suggestion given …
For What It’s Worth … WordPress doesn’t appear to be very stable …
That’s my 2 cents ..
Kelly said,
January 19, 2009 at 2:27 am
I had a problem with viewing errors, so I added:
php_flag display_errors on
to the .htaccess file.
Then I saw that there were files missing on my server. Seems like my wordpress upload decided not to complete its job!
I walked through and added the missing files (such as some media.php and admin.php ones) and then it worked!
Luke said,
February 24, 2009 at 9:08 pm
This saved me big time! My site was down and I couldn’t figure out for the life of me what caused it. Thanks a ton!!!
Philip Arthur Moore said,
March 3, 2009 at 7:10 am
Thanks for the excellent writeup. I’d say the first thing to check for after any upgrade is the extra carriage return in wp-config.php. I just had the white screen of death and a quick check yielded the extra space at the bottom of that file. Clean that up before trying anything else!
Alexwebmaster said,
March 3, 2009 at 9:21 am
Hello webmaster
I would like to share with you a link to your site
write me here preonrelt@mail.ru
Colin McNulty said,
March 3, 2009 at 8:50 pm
No worries Philip. Alexwebmaster, all links are welcome.
lordjz said,
March 13, 2009 at 5:04 am
After trying all suggestions above, the only thing that worked immediately for me was to manually delete the plugins that I had installed. Deactivating them wasn’t enough. Its good to list them (numbered as you install and activate them), then you will be able to delete them sequentially one by one (starting with the last), until the screen of death goes away.
Sorry cannot post my blog url as yet because I still have to get a new Domain name.
Zak said,
March 14, 2009 at 12:36 am
Thanks a ton man! My Wordpress 2.7.1 powered blog was just completely crippled due to that one extra space. The odd thing was that I didn’t do any recent upgrades. All of a sudden my admin area just went blank. I owe ya a beer, or six,
Cheers,
Zak
Colin McNulty said,
March 15, 2009 at 9:47 am
Lol, no worries Zak. A mere mention and link back from your blog is all the thanks required.
Mike Adams said,
March 16, 2009 at 9:00 pm
Thanks, Colin! After moving my site to a new host, I suddenly had the white screen of death when I would log in. I couldn’t do anything!
Sure enough, there were two blank lines at the end of the wp-config.php file. I deleted them and everything works again.
Cheers,
Mike
mal haskins said,
March 18, 2009 at 8:35 pm
AHHHHHHH!
The single line white screen of death in the config file …
Mi Amigo – thank you for posting up this informaiton – you saved my day!
Mike said,
March 27, 2009 at 9:09 pm
I just spent 2 hours uploading and reuploading the wp files, all the while ignoring my recently updated config file. Thank you so much for finding this. You just saved me a weekend of frustration!
RaiulBaztepo said,
March 28, 2009 at 10:46 pm
Hello!
Very Interesting post! Thank you for such interesting resource!
PS: Sorry for my bad english, I’v just started to learn this language
See you!
Your, Raiul Baztepo
PiterKokoniz said,
April 7, 2009 at 11:22 pm
Hi !!
I am Piter Kokoniz. oOnly want to tell, that your blog is really cool
And want to ask you: will you continue to post in this blog in future?
Sorry for my bad english:)
Thank you:)
Piter Kokoniz, from Latvia
Matt said,
April 10, 2009 at 9:45 pm
Another tip – you can try renaming all of your plugin folders through your ftp client. change ‘foldername’ to ‘foldername1′.
I did this and it solved the white screen issue.
Andrew said,
April 15, 2009 at 4:31 am
wow it works, thankyou thankyou, i thought it might spend hours looking for this!
Ben Q said,
April 24, 2009 at 3:21 am
I just fixed this issue differently. I got the blank screen of death after jumping from an upgrade from 2.3.3 (or so) to 2.7. I went in via FTP and deleted the current theme, was able to login, and change the theme to another one, and wah-lah, it now works.
Fun stuff!
Wordpress still rules.
MMcD said,
April 28, 2009 at 9:11 pm
You are so right – I got the blank screen after messing around with the function.php file in my theme – I was doing really well, but then all of a sudden I got the blank screen any time I edited a page or post and then clicked update – this happened to me before and I started fresh (a real time waster). However, doing a google search came across your article here on it…and I reckoned I must have messed up the function.php file when I was trying to add some stuff to it…..sure enough at the very end there was a lovely line space before the final ?>
I removed the linespace and then tried to edit and update a post and voila no more blank screen.
so be careful when adjusting those important template files…………….
thanks for sharing your post
Colin McNulty said,
June 16, 2009 at 8:26 pm
Thanks for everyone’s thanks, it is appreciated. Link backs are also appreciated.
Someone hold my hand, I’m about to upgrade to Wordpress 2.8… I’m just stepping outside, I may be some time!
Kristina said,
June 19, 2009 at 11:20 pm
I got the white screen on my main wordpress blog page after changing web hosts and they moved my account for me. I assumed it was something regarding the new installation but didn’t know where to look. The wp_config.php file seemed fine. Turns out, after reading the comments here, I went to the admin theme manager (typed the url directly) and lo and behold, there was a notice at the top of the page that the current theme was broken and it was reverting to the default. Well that obviously wasn’t working, so I selected another unmodified theme and wow, back to life. Funny thing is, when I then selected the same modified theme I had before, it worked just fine.
Ricker said,
July 1, 2009 at 6:09 am
I had this same blank page disaster post-upgrade to 2.8.
My solution, however, was not to delete the extra lines (although my wp config and some other files DID have the extra line….)
The problem for me was the PLUGINS. Some were not compatible with 2.8 and i can’t believe that it could just BLANK OUT the entire site, INCLUDING the admin area!
To solve this problem.. (using an FTP program) i renamed my “plugins” folder to “plugins_old”. Then I reuploaded the default “plugins” folder from the wordpress install files.
Voila! Blog is back!
Abhijeet Patil said,
July 1, 2009 at 5:03 pm
I tried all possible ways to fix this award winning issue… lol … and tried this. . Go to your phpmyadmin edit table (wp_xx_options)
Method 1:
If your ( template & stylesheet fields are showing ’str’ value ) edit them and make default and default . That works …
Method 2:
Execute this code paste it in index.php
Abhijeet Patil said,
July 1, 2009 at 5:04 pm
… Execute this code paste it in index.php
Abhijeet Patil said,
July 1, 2009 at 5:05 pm
$updatetemplate=”update wp_options set option_value=’default’ where option_name=’template’;;
mysql_query($updatetemplate) or die(“Could not update template”);
$updatecss=”update wp_options set option_value=’default’ where option_name=’stylesheet’;;
mysql_query($updatecss) or die(“Could not update css”);
Abhijeet Patil said,
July 1, 2009 at 5:07 pm
some corrections in method 2:
Execute this code paste it in index.php
$updatetemplate=”update wp_options set option_value=’default’ where option_name=’template’;
mysql_query($updatetemplate) or die(“Could not update template”);
$updatecss=”update wp_options set option_value=’default’ where option_name=’stylesheet’;
mysql_query($updatecss) or die(“Could not update css”);
Katy said,
July 27, 2009 at 2:41 pm
Oh my gosh, you helped me fix my problem. After activating a bad theme, my whole wordpress installation went blank. I investigated the wp-config.php file and sure enough, it had the extra carriage return in it. After removing the carriage return, I was able to get back into the wp-admin pages, then re-activate my theme that does work.
Thank you SO MUCH!
Colin McNulty said,
July 27, 2009 at 5:56 pm
Always a pleasure, never a chore.
Pissedoff said,
July 30, 2009 at 8:03 pm
People are going nuts trying to get this crap wordpress working and you are playing games. What a bunch of crap.
Colin McNulty said,
July 30, 2009 at 8:50 pm
Huh? What do you mean I’m playing games?
News » Wordpress Blank Screen of Death » Gossamer Web Design said,
August 4, 2009 at 6:34 pm
[...] So I went off to google foo to see what I could find. Turns out, this seems to be quite the problem in the WordPress world. It also seems that are many, many theories and proposed solutions to what is called the “WordPress Blank Screen of Death“. [...]
jack said,
August 7, 2009 at 5:18 pm
This is undoubtedly a helpful article.
I don’t think that its helpful for the author to have made such a big deal of the problem and made out that wordpress is particularly to blame or unique in suffering from it however.
This wordpress error could undoubtedly could be handled better, but dynamic web languages aren’t like desktop languages usually in their error handling and feedback methods.
The WSOD (white screen of death) is something that happens from time to time in nearly all PHP applications. Yes wordpress could no doubt accommodate it better, but I defy you to find any CMS in existence that has no user reports of WSOD’s. If there is a syntax or logical error in the scripts then the server running PHP will display nothing – a white screen. Its harder to deal with these kind of errors as your script will never get to the part where it tries to handle such errors as it will already have stopped running and all the user will see is a blank page.
This is no news at all therefore.
What you have here is useful advice, not any sort of revelation of cutting criticism about wordpress
In my view your article is unnecessarily sensational.
Dobra said,
August 8, 2009 at 11:00 am
Hello, I think everyone who has a wordpress blog had problems, I do not think there is someone who did not! I have not ever had problems that they can not do .., but I: can not insert media in its pages and in any post, because when you may want to upload media, you no longer appears as a window on the same page but I transferred to another page for “uploads”, here I can upload normal media, pictures appear in the gallery, but when the button “insert into post” a white page, but with the correct page that I want to insert the picture. I want to mention that “dashboard” in “quickpress” I can upload pictures in html.
Thanks a lot everyone who can help me.
Colin McNulty said,
August 10, 2009 at 6:23 pm
Hi Jack, thanks for the considered comment.
> In my view your article is unnecessarily sensational.
You may well be right, but 90% of the content is about the problem, how to diagnose it and how to fix it. If there was a small measure of sensationalism, it was a reflection of my emotional state at the time: frustration for the issue in the first place and finally relief that it was all over.
Assuming that even a very generous 10% of the people who visit this page actually bother to comment, then this post has helped over 100 word press users. So all in all, I’m happy with the content.
Wordpress White Page Of Death | Game Review Database said,
August 14, 2009 at 7:34 am
[...] http://www.colinmcnulty.com/blog/2008/07/08/solution-to-wordpress-blank-screen-of-death/ [...]
Paul said,
August 14, 2009 at 10:05 am
Just a little something to add here. In my case, there was an extra space at the end of the wp-config.php file, but removing that (or carrying out any of the other steps described here and elsewhere) did not fix the problem.
I remedied a WSOD that occurred with a Wordpress-based site I was developing by identifying a problem with the theme’s (not the universal WP files) functions.php file. I had added a few lines of code there to enable styling of the wp-tag-cloud output, and this broke the CMS/admin. Any admin action, beyond navigating around the admin pages, would produce a WSOD. Perhaps due to caching, this didn’t occur immediately after adding to the functions.php code, so the reasons were not obvious. Removing the added lines of code from functions.php didn’t fix it either – I had completely replace the theme’s functions.php file with the ‘classic’ theme functions.php file to fix the problem. Adding ‘my’ extra lines of code back to this version caused no problems, and it’s all up and running successfully again.
Thanks for a thorough post on this subject.
Hrannar Baldursson said,
August 24, 2009 at 9:14 am
I changed the name of my plugins folder to plugins_old and created a new empty plugins folder. Resolved the problem.
David said,
September 3, 2009 at 9:58 pm
Jack…. Your comment
?The WSOD (white screen of death) is something that happens from time to time in nearly all PHP applications. Yes wordpress could no doubt accommodate it better, but I defy you to find any CMS in existence that has no user reports of WSOD’s.
I have to agree that in so far as PHP based systems are concerned that this has happened to me regularly. I found out that simply messing around with WP with only one or two demo posts etc. and switching between themes will tcause this. In particular I found that it was Woo Themes that invariably caused it without fail. Dealing with any of their free materials is like being a snake handler… eventually you WILL get bit. I can’t say about their paid themes but if even a free version is any indication then I’m staying the hell away.
I have used a Perl based CMS called Big Medium and I can honestly say that not once, not ONCE with dozens of test sites have I ever encountered this grief. The only drawback for a non coder/designer such as myself is that there is a lack of themes or plug ins with all the eye candy. If there were more I would forego the evil siren song of Wordpress and all other bells and whistle PHP/MySQL systems and sail into safer and infinitely more stable waters.
Sensationalism on the original topic? Not in the least. WP is frankly at the very root… messed up. I find that the WP defenders of the faith, like those who pimp Joomla, or those who drink the Kool-Aid of other PHP based CMS or forums garbage, don’t realize how much blood sweat and tears it costs to fix this stuff. Don’t get me wrong. I like WP a lot. I really do. Its just that I realize its an unfaithful mistress and will stab me in the heart without so much as a thank you.
Colin McNulty said,
September 5, 2009 at 7:39 am
> I like WP a lot. I really do. Its just that I realize its an unfaithful mistress and will stab me in the heart without so much as a thank you.
Lol, that’s a great line David! WP stabbed me in the heart again this week. WSOD reared its head again, this time without any obvious cause. The last time I touched the site was to post, I checked the post was visible and went to bed. In the morning: just a sea of white on the public blog (admin pages were still working).
3 hours I lost that evening trying to workout what was wrong. I could find nothing in any log files to give even a clue as to what was wrong. That’s my biggest complaint, nothing to go on. In the end, I resorted to simply re-uploading the core files and that mysteriously fixed it. Barking. :-S
Chris Adams said,
September 5, 2009 at 6:39 pm
I’ve been having recent struggles with the WSOD on WP 2.8.4 and have linked it to two troublesome plugins: Twitter Tools 2.0 and Digg Digg 1.8. Specifically I was having issues with editing posts, creating posts, and even erratic WSOD’s when browsing my sites using Safari 4. Too bad because I like these plugins quite a bit.
Dawn P said,
September 8, 2009 at 2:51 pm
That blank line can also cause problems at the BEGINNING of the file, just FYI – that’s where mine was. THANK YOU for this post!!
grentuu said,
September 10, 2009 at 10:16 am
3 days of pain. Installing deleting, reading php files. The carriage return did it thank you.
Where I kept going wrong (duh!) was I kept trying to reload my site instead of trying to load the admin page. As soon as I did that and reinstalled the default theme back and running.
Thank you
Solution to problems after upgrading the WordPress files — *baby pink* said,
September 12, 2009 at 7:02 am
[...] for WP. Yea, my blog was dead. As I further googled, I found Colin McNulty’s “Solution to WordPress Blank Screen of Death“ pretty helpful. It seemed that a lot of people had problems with WP’s blank screen. [...]
Ann said,
September 23, 2009 at 3:00 am
… I have had so many WSODs now, I am on the verge of giving up on WP altogether. I set it up some months ago to play, then WSOD reared its ugly head. Then did a local install and started testing there – all went well, then all of a sudden, WSOD appeared. Just went back to my ‘live’ install today, and remarkably I could access the admin area – but then mistakenly (because it seems this causes lots of problems) I clicked on the upgrade link, and everything is back to the WSOD again.
Since I didn’t have anything of note in the database, I killed everything, deleted the database and all files, and started again with a fresh upload of WP3.8.4. But – now I get the WSOD just trying to get to the install.php file! Guess there’s something wrong at the server end, but I am just stumped at how difficult this is.
Has anyone found a really good host for WP who makes sure it works, and/or will help if it doesn’t? And/or, any ideas at all as to how to fix this most frustrating problem at the install level?
Any thoughts most appreciated.
Ann said,
September 25, 2009 at 12:08 am
I have now been advised by my webhost that (at least for the WP install problem) it was a permissions issue. Apparently they have PHP installed as CGI and not an Apache module, and the permissions need to be 755 not 644.
I have asked them if that means I have to change the permissions for all files downloaded with upgrades and/or plugin/them installs, but haven’t heard back yet – but this could explain why things went haywire when I downloaded various plugins and the upgrade.
Anyway, I now have my site up and running (www.beheart.org), and will give WordPress more of a go.
Hope this can help others who are experiencing the WSOD wierdness.
Jackson said,
October 1, 2009 at 3:38 pm
Thanks for this post. I found it not in my wp-config.php file, but in my theme’s functions.php file.
Also interesting to note, in my case it was two carriage returns, tested with only one and no WSOD.
Thanks again.
Lenny23 said,
October 10, 2009 at 1:56 pm
My feeling is that it is to low php memory cache of the server adjustment.
Wordpress requires huge memory cache and when the server is under pressure it simply crashes and shows a blank white page. Therefore no error message, it is like choking the server down.
Nic said,
October 14, 2009 at 12:08 pm
Thanks so much – the active_plugins sql fixed my blank screen of death. I had removed the blank line last week, but was still locked out.
Beshoy said,
October 20, 2009 at 7:55 pm
Thanks for the info, clearing the active_plugins fixed it!!!
Brian said,
October 25, 2009 at 4:50 am
For me it was removing the blank line AND the ?> at the end of the file. While looking at a sample wp-config file for the latest version I noticed that it no longer had the ?> at the end of the file. Once I removed that I was in…
rc said,
October 31, 2009 at 9:31 pm
I had the same problem, but you gave me the idea to check an error file. Luckily my MAMP server keeps one and pointed me to an updated section in my functions.php file. Thanks!
Warden said,
November 3, 2009 at 1:23 pm
Ok, here’s my story Colin McNulty!
I am using Wordpress 2.8.5 and this peace of crap is so full of bugs that it makes me rip my hair out.
It is not a plugin problem because I have disabled all of them and the problem still persists.
Your method from this article does not apply to 2.8.5 because the WP-CONFIG files is a bit different and anyway I don’t have an empty line as I checked it and compared it to WP-CONFIG-SAMPLE file from a fresh downloaded WP archive.
Can this be a theme problem? How can I fix this? I can’t even publish articles and I also have another error. I can’t upload pictures because I get “IO error.”
What in the world is wrong with Wordpress 2.8 series???
And…
P.S. There is no such thing as the “human race”. The mass media invented that term but biology clearly says that there is the human species (homo sapiens species). Race is something different to species. There is the Caucasoid race, the Negroid race, the Mongoloid race…
Colin McNulty said,
November 3, 2009 at 7:28 pm
Hi Warden,
Sorry to hear you’re having trouble. I can’t offer much advice that isn’t already written down here, either by me or others that have had the same problem. I would suggest, in this order:
1) You rename your plugins folder (like deleting it, but you can put it back).
2) You change back to the default theme and delete or rename the old theme folder, to similarly rule it out.
3) You re-copy the WordPress files to your webserver, to make sure that nothing has been corrupted or hacked. Make sure you get the right version!
4) If none of that helps, you see if you can find a WordPress professional to debug the problem, but you’ll have to pay for this of course.
Good luck.
Pius said,
November 5, 2009 at 9:07 pm
Thanks Colin.
When one of my friends was faced with this (blank admin page) problem and called on me for help, I realized I couldn’t access the admin panel. I could get to the login page but once I enter the username and password, the blank page comes up. The trick I used to get in was to go directly to one of the admin pages, (i.e. http://www.your-domain-url/wp-admin/edit.php)
With this I was able to get to the dashboard. The problem I found was with the permalink setting. The site wasn’t configured to use anything else but the Default setting because it doesn’t have mod_rewrite enabled.
Changing it from “Day and name” to the default took care of the blank page. Now I’ll have to help him figure out a way to enable it as long as he’s going to pay me to do that…:-). After all, this is what I do for a living at http://www.jpacglobal.com
Again, Colin, you did an awesome job with your explanation.
Kurt said,
November 7, 2009 at 7:10 am
I just delete the active_plugin table and the page can be load
than I activated again the plugins selected in dashboard
Thanks Colin, you awesome, my page can play again…
Cara Mengatasi WP Blank | kurtubi.com said,
November 7, 2009 at 7:12 am
[...] saya dapatkan dari googling meski dengan keterbatasan bahasa, saya nekat dari postingan orang ini, setelah baca-baca, masih saja tidak mengerti namun akhirnya, dari banyak cara yang dia tulis saya [...]
LOL said,
November 17, 2009 at 2:53 am
Thanks a ton, my friend. Deleting the empty line fixed it for me.
I was starting to panic when none of the commonly recommended troubleshooting steps helped. But thanks to you I only wasted 10 minutes.
Cheers!
Dr S K Verma said,
December 20, 2009 at 6:03 pm
Thanks man! You saved my life!! Weeks of hard work was going to be lost. I had a backup of wp-config.php file just before I installed Ultimate Google analytic plug in. I restored that file and thats it. I could see my lovely dashboard again!
This plugin is probably not updated to WP2.9 (latest version.
Thanks again!
sunil
Kumar Sekhar said,
December 22, 2009 at 7:04 am
Great article dude !!! It’s save my life.
Thanks again!
Cheers!
Kumar Sekhar
Jarrod1937 said,
December 30, 2009 at 10:17 pm
Thank god for your post… I switched the host config for the db from localhost to an ip… and all of a sudden everything worked but the backend! Made absolutely no sense. That is until i found your post, and guess what?! That indeed was the cause, good job finding such a minute detail.
Grateful in CO said,
December 31, 2009 at 12:20 pm
The! Empty! Line!
*takes deep breath*
*takes ten more*
Yes, that was it. So what if I have less hair now than when I started trying to fix this problem for my client who tinkered with their blog? Your post saved the day, and from the looks of it, has been doing so for lots of people, routinely, for over a year now.
Many, many thanks!
How I Solved My Wordpress White Screen of Death said,
December 31, 2009 at 7:45 pm
[...] 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 [...]
Tony said,
January 29, 2010 at 11:16 am
Unfortunately none of these solutions are working for me.
I did a bulk upgrade of some plugins, including Twitter Tools (running WP 2.9.1 by the way), then clicked on the Upgrade option again, and it sat there. I cancelled, and am not sure if it started to upgrade or not, it should not have done as I am up to date, but I then got the WSOD.
I tried removing the blank line – no change. Tried renaming the pligins folder – no change.
The ONLY page I am able to get into is http://www.delovesto.com/wp-admin/upgrade.php and all this does is tell me that my WP is already up to date, and back into the WSOD again
I can’t get into the Login, Admin, Edit, Post etc pages.
So thanks for the help, it has at least taught me a few things, but so far hasn’t fixed the problem for me. As usual, it’s probably something really obscure, simple and stupid that is causing this.
I tried running the MSIE8 Debug option, but nothing comes up. The screen is blank and the scripts don’t show.
Wish me luck…
Austin said,
January 29, 2010 at 4:09 pm
This can also happen in your themes functions file. Make sure you do not have any “extra” returns after your last ?>
Solved my problem anyway. thanks.
Colin McNulty said,
January 30, 2010 at 4:58 am
Sounds like a tough one Tony. I’d suggest somehow a file has got corrupt, doing a reinstall of WP might help. This has worked for me after a WSOD during an upgrade.
Thanks for the tip Austin!
Leo N said,
February 13, 2010 at 6:36 am
An unclosed tag in the theme functions.php caused the problem for me. Thanks for helping me get on the right track!
Greg Malkin said,
February 23, 2010 at 10:25 am
I fixed the problem simply by deleting the extra lines I had accidentally added at the end of my function.php file