Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I accidentally removed a bunch of plugin folders. I restored them all directly after, but since then my site is completely blank. Can't see anything, it's just white.

I'm not sure what to do, but looking at a log file seems like a good start. Is there one?

share|improve this question

2 Answers 2

up vote 5 down vote accepted

There's not one if you didn't set one up. The codex has a good example of how to do this.

<?php
@ini_set('log_errors','On');
@ini_set('display_errors','Off');
@ini_set('error_log','/home/example.com/logs/php_error.log');

/**
 * This will log all errors notices and warnings to a file called debug.log in
 * wp-content (if Apache does not have write permission, you may need to create
 * the file first and set the appropriate permissions (i.e. use 666) ) 
 */
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors',0);

White screen of death is usually caused by WordPress looking for the active theme and not finding it. If you can access the admin area, got to Appearance > Themes and reactivate your theme.

share|improve this answer
    
I'm guessing that will only log PHP errors though? I was hoping for a wordpress-internal error log kind of, so it logs wordpress errors when something breaks (like it did now). Like Theme was not found, causing white screen of death or something like that. I fixed it btw, i guess i uploaded the theme in the wrong dir or something because i re-opened filezilla and found that the theme folder wasn't there. (I still don't know where the other copy is) –  qwerty Nov 1 '12 at 14:41
    
Nope, no internal error log like that, unfortunately. –  chrisguitarguy Nov 1 '12 at 14:56
    
White screen of death will be caused by PHP errors, and the way PHP and Wordpress work means that once PHP encounters a major error it'll stop entirely - which means that any Wordpress error-logging function might not get run at all! –  guiniveretoo Nov 1 '12 at 15:46
    
@guiniveretoo If it was caused by a PHP error i should be able to see the error, shouldn't i? Also, i'm not sure, but i would imagine wordpress is smart enough to check if a theme exist before it tries to load it, and if it's not found, display a white screen of death (which, if my theory is correct, should be replaced with an error message). –  qwerty Nov 1 '12 at 17:20
    
Most servers (correctly) turn off printing errors to the screen. If you can see errors on your live site, it's a security vulnerability. If you are getting the white screen of death on your live site, most decent hosting companies will have a log file somewhere in your file structure that will log the most recent PHP errors - if you can't find one, I'd contact them to find out how to turn it on. –  guiniveretoo Nov 1 '12 at 17:41

Something I find super helpful is a plugin called Debug Bar. Really helpful for showing what actions are being run, also shows notices and warnings, etc. Super helpful to have in a dev environment. I'm not the developer of the plugin btw.

Debug Bar

Adds a debug menu to the admin bar that shows query, cache, and other helpful debugging information.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.