Help- wordpress site has white screen of death

4 replies
So, I am no expert in Wordpress, but all I did was copy a small piece of code or the header file and paste it to try to change my site description. Now my site is a total blank white screen. So obviously I did something wrong. I would love someone to help. I deleted the part of the header.php file that was used for the site description. I tried adding what I thought would change it but it didn't work. Unfortunately, I didn't copy the old code to change it back. Let me know if you know how to fix this. thanks

Here is the code. I have deleted something that is making the site blank.

<title>

&nbsp;|&nbsp;
<?php bloginfo('name'); ?>
<?php } ?>
<?php if ( is_search() ) { ?>
Search Results&nbsp;|&nbsp;
<?php bloginfo('name'); ?>
<?php } ?>
<?php if ( is_author() ) { ?>
Author Archives&nbsp;|&nbsp;
<?php bloginfo('name'); ?>
<?php } ?>
<?php if ( is_single() ) { ?>
<?php wp_title(''); ?>
<?php } ?>
<?php if ( is_page() ) { ?>
<?php wp_title(''); ?>
<?php } ?>
<?php if ( is_category() ) { ?>
<?php single_cat_title(); ?>
#death #screen #site #white #wordpress
  • Profile picture of the author tweakr
    Could you post the rest of the code, there's a few things messed up there, and it's missing quite a bit even if we were just looking for the title tag. Here's some code that should work though.

    Bah, a lot of the php variables got stripped out...I put it up on pastebin http://pastebin.com/YJptZGdW
    {{ DiscussionBoard.errors[5379359].message }}
  • Profile picture of the author wpaskme
    Hello bluecreel,

    Normally the white screen of death is caused by an empty line at the end of your functions.php file. Please check to confirm there is no empty space at the end of this file.

    If the blank screen came after making adjustments to the header.php file, it is possible that you made some mistake in the conditionals used, however this will normally return some error.

    As mentioned, please check the functions.php first, then post your results.
    {{ DiscussionBoard.errors[5379875].message }}
    • Profile picture of the author KreoZen
      You see a white screen simply because error reporting is off by default...

      If it wouldn't be, all hosting provider would have serious security flaws, and we would see a lot of PHP warnings everywhere on websites!

      Now... open your index.php, directly at root of your Wordpress installation, and put these two lines at the top of the file:

      PHP Code:
      ini_set('display_errors'1);
      error_reporting(E_ALL); 
      Now, reload your page... you should see some error message that will help you determine what is the issue you're experiencing...

      Most likely an undefined function, or something like this, depending of what your theme looks like.
      {{ DiscussionBoard.errors[5381478].message }}
  • Profile picture of the author mywebwork
    I'm with wpaskme, check your header.php for empty whitespace before or after the opening and closing PHP tags respectively.

    But now for the obvious question - why not just restore your site from your latest backup and start over again? Or were you actually foolish enough to make a PHP edit on a live website without doing a backup first?



    Bill
    {{ DiscussionBoard.errors[5381511].message }}

Trending Topics