The WordPress Admin Panel and The Blank Screen of Death

Posted on November 11, 2008  |  Category: Tutorials

A client approached me with an issue that I had yet to encounter while working with WordPress. After he had upgraded to the latest version, he tried to login to his admin panel but was confronted with the horrible blank screen of death. If you have never seen it consider yourself lucky. All of a sudden it appears as if your admin panel no longer exist.

This doesn’t always happen but when it does it can be pretty frustrating to figure out what’s going on. There are many posts online as to what may be causing this annoyance. Some people who have encountered this issue have found the culprit to be plugins (see here). But that wasn’t the case for me. It took me a lot of messing around to figure out what was going on. In the end, it came down to the difference between this…

<?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 each KEY to a different unique phrase.  You won't have to remember the phrases later,
// so make them long and complicated.  You can visit http://api.wordpress.org/secret-key/1.1/
// to get keys generated for you, or just make something up.  Each key should have a different phrase.
define('AUTH_KEY', 'put your unique phrase here'); // Change this to a unique phrase.
define('SECURE_AUTH_KEY', 'put your unique phrase here'); // Change this to a unique phrase.
define('LOGGED_IN_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. */

if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
require_once(ABSPATH . 'wp-settings.php');
?>

and this…

<?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 each KEY to a different unique phrase.  You won't have to remember the phrases later,
// so make them long and complicated.  You can visit http://api.wordpress.org/secret-key/1.1/
// to get keys generated for you, or just make something up.  Each key should have a different phrase.
define('AUTH_KEY', 'put your unique phrase here'); // Change this to a unique phrase.
define('SECURE_AUTH_KEY', 'put your unique phrase here'); // Change this to a unique phrase.
define('LOGGED_IN_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. */

if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
require_once(ABSPATH . 'wp-settings.php');
?>
 

Line #32 is the difference. An extra blank line after the last “?>” caused the whole thing. Bah! I removed that and everything worked great.


Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Short URL: http://bavotasan.com/?p=48

7 Responses to “The WordPress Admin Panel and The Blank Screen of Death”

  1. Thanks a lot, my wp-admin category.php was showing blank and this fixed the issue.

    #2279
  2. i want to remove wordpress admin panel.
    is it possible?

    #3216
  3. Michelle

    Thank you, thank you, thank you!

    I had the exact same problem and, after 3 hours of googling and trial and error, I finally sorted it thanks to your post. :)

    #3755
  4. Ted

    Thank you for this post, it’s a life-saver and a mystery-solver!! I donated $10 for it!

    #5177
  5. Thanks a bunch dude, this kept happening and I was reinstalling wordpress every damn day until I found this post.

    #5792
  6. I’d love to know where these sites with the problems are hosted. I had a similar problem that we thought was related to Earthlink hosting. Earthlink doesn’t support “later” versions of WordPress, apparently. We’re considering abandoning EarthLink for other hosting, so I’m keen to know for sure.

    #7604

Leave a Reply

To enter code in the comment box, please place it between <pre lang="php"> </pre> tags. You don't have to convert any characters to their hex/HTML code. Just add your code the way you would to any code editor.