The WordPress Admin Panel and The Blank Screen of Death
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…
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | <?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…
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | <?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 (imagine that period is just a blank line). An extra blank line after the last “?>” caused the whole thing. Bah! I removed that and everything worked great.



Thanks a lot, my wp-admin category.php was showing blank and this fixed the issue.
i want to remove wordpress admin panel.
is it possible?
You want to remove the whole admin section, or just the dashboard?
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.
Thank you for this post, it’s a life-saver and a mystery-solver!! I donated $10 for it!
Thanks a bunch dude, this kept happening and I was reinstalling wordpress every damn day until I found this post.
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.
I too experience the same mystery earlier. But unfortunately, i did not find your blog post earlier. Resulted with reinstall the whole wordpress again. Really useful and great post.
Thanks! Pointed me right to my problem — I had edited a file earlier and left a space! Saved me hours of searching and pulling my hair out!
Whoa man! You saved me!, i am having same problem, lets see.
I tried this but still the same problem!
This issue had sucked up hours of my week until I found this post. Thanks!
Thanks!!!!!! Gracias!!!!!!
Hey.
I had valid code I put at the end of wp-config.php and it also screwed up the whole thing, so consider anything you might have added at the end of the file.
Thanks for the post
This post has been a life saver.
Why do the simple things like a “space” take the longest to find and debug!?
Thanks again
Just in case anybody still hasn´t found a solution.
I had the blank screen on my local xamp set up. The frontend was ok, and I could see all my sites just fine, I just couldn´t get in to admin.
I ran http://localhost/wordpress/wp-admin/upgrade.php, and now I´m fine!
Hello! I have the same problem with one of my blogs. Question, where do I found MySQL settings? Is it the one inside wp.config.php? Mine looks a bit different.
Thanks! Hope to hear from you.
The wp-config.php file above is a little old, but you should still have database settings near the top.
If you’re talking about the wp-config file here. Mine looks longer (up to line 90) and it doesn’t have the extra line or period. Am I looking at the right file?
If your wp-config.php file has a blank line near the end, it could be causing the blank screen. It might also be something in your theme’s functions.php file. Same blank line at the end can bring your site down.
Hi! I checked the functions.php and it looks okay.
What else can I possible check? Thank you so much.
Have you deactivated all your plugins?
Speaking of blank white screen of death… I had upgraded a WordPress recently from 3.0 to 3.1 and my entire frontend went blank. The backend was perfectly fine, but the public side no matter what I did wouldn’t show up.
I found a solution, maybe it can help some others:
http://www.tlswebsolutions.com/wordpress-3-1-upgrade-frontend-blank-site-backend-okay-iis/
Additionally, if you’re programming in PHP, it’s a good practice to end your PHP files without “?>”. This way, you never have to worry about outputting blank characters to the browser before PHP finishes executing.
Great spot – my problem was in my theme’s functions.php, by deleting the blank lines it’s solved the problem.
Thanks.
Thx Matt! I had the same problem and the removing blank lines from functions.php solved it!!
It’s odd because my wp-config had the ?> missing which is what caused the entire issue.
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . ‘wp-settings.php’);
?>
It’s fixed now. Thanks for the great post!