White Screen of Death: What it Means and How to Fix It

How to fix the white screen of death in WordPress after editing your functions.php file.

You’re messing around in your functions.php file (courtesy of Appearance > Editor). You type in a bit of code, hit “Save”, then suddenly your whole site goes white.

Blank.

You can’t even sign in.

A lot of people think this means their blog is GONE… but that’s not the case.

One time, a girl posted about this white screen of death and how she thought her blog was gone, so she did all this stuff about trying to reinstall WordPress, etc. Long story short, the problem could have been fixed in 10 seconds, but since she didn’t know that, she ended up doing even more irreparable damage to her blog.

The white screen is like a spelling mistake.

Imagine you’re writing a six page essay. You make a stupid spelling or grammar mistake, so the teacher pulls your essay out of your hands, writes the spelling mistake on a blank white piece of paper, shoves it in your face and says, “Does this seriously look correct to you?”

Since the glaring spelling mistake is in your face, you can’t see your essay. But that doesn’t mean it’s gone. It’s just hidden behind the teacher’s back in her other hand. You fix the spelling mistake and she’ll give your essay back.

That’s LITERALLY what’s happening here.

  • Your blog is not deleted.
  • Your posts are all still there.
  • Your theme and design is all still there.

So what’s the problem?

It’s just a coding syntax error.

There’s a coding error in your blog. You messed up the PHP code while digging in functions.php. Maybe you…

  • forgot a semi-colon.
  • mis-typed the name of a function.
  • tried to put CSS inside of the PHP file.

Whatever it is, because of this coding error, your blog is having a hard time being displayed. Everything is still there and fine behind the scenes, it just can’t be displayed right now.

Fix the coding error and everything will go back to normal.

  1. Login to your cPanel. This is usually accessible through your web host’s website. If your host doesn’t use cPanel then I can’t help you here and you’ll need to ask your web host where to find the “File Manager” or how to get FTP set up.

  2. Inside cPanel, locate the “File Manager” icon, which is in the “Files” section. Click it.

    Arrow pointing to the File Manager icon in cPanel

  3. A little window might pop up asking you to “Select the directory what you wish to open.” Select, “Document Root for {your website here}”. If that’s not an option, “Web Root” is also okay.

    File manager directory selection

  4. That will open up a page that looks a bit like this:

    File Manager showing the public_html directory.

    Double click on wp-content, then double click on themes then find your theme’s folder inside that one and double click on it.

  5. Now you’re inside the folder of your theme. And guess what’s in there! functions.php (or whatever file you were editing before your site crashed).

    Highlighting the functions.php file in the File Manager

  6. Click on the functions.php file, then click the “Code Editor” button at the top of the page. This will show you all the code in functions.php. It’s just like editing in Appearance > Editor, but it’s actually better. You can find what bit of code you added before your site crashed and fix it or remove it.

Once you fix the problem, your site will be accessible again!

Have you ever caused a white screen of death on your blog? Was it easy to fix?

Photo of Ashley
I'm a 30-something California girl living in England (I fell in love with a Brit!). My three great passions are: books, coding, and fitness. more »

Don't miss my next post!

Sign up to get my blog posts sent directly to your inbox (plus exclusive store discounts!).

You might like these

27 comments

  1. The first time this happened to me, I was in near hysterics. I was lucky enough to have someone more knowledgeable than me in the office who helped me fix it. He stayed nice and calm and talked me through logging into the FTP and re-uploading the functions.php file to the server. I was smart enough to have a copy of the original code before I made changes.

    Melanie Simmons @mlsimmons recently posted: Grave Visions Audiobook by Kalayna Price (REVIEW)
    1. Yeah if you’re not familiar enough with code to identify and fix the errors, then it’s always a good idea to take a backup first.

      My workflow before I got good at PHP was:

      1) Copy entire functions.php file and save it in a text file.
      2) Make my changes on the site.
      3) If something bad happened, just copy and paste the original back in.

    1. Hey! I had the white screen crash after installing plugins too. What did you do? Because the functions did no work for me.

  2. Seriously, your posts all seem to arrive at the PERFECT time. I had this exact issue the other day – I knew it wasn’t a big problem, but I had no idea how to fix it. So I had to faff about by contacting my web host to get them to sort it. Several hours (and a lot of stress) later, it was fixed… but it’s so good to read this post and learn how to fix it myself, if it happens again! Thank you 🙂

    1. You’re so welcome, Mike!

      It’s really useful to be able to take control of a situation like this on your own. 🙂

  3. Awesome post, Ashley.
    It is good to be able to take control of the situation when a white screen (WSOD) happens.

    In some ways this is a good thing when it happens on a live website, because it means that the actual error (along with the path to the faulting file) is hidden from prying eyes. A reasonably good security measure (somewhat).

    For a local test website, folk may wish to display these errors (if they exist).

    As you pointed out, “functions.php” is usually the culprit. In some other cases, it could be themes or plugins.

    This is why backups are so important.

    Do you have any recommendations for troubleshooting further, in case its not “functions.php” at fault?

    Thanks

    1. Hey CJ!

      If it’s not functions.php then you’ll want to get the exact error message. As you said, many hosts choose to hide these errors by showing you a blank page instead (or a 500 Internal Server Error page). You’ll need to get the actual error message by checking your error logs. These can often be found in cPanel too.

      Once you have the error logs, you’ll need to find the error message. This shouldn’t be too difficult because they’re all timestamped. Just find the most recent one.

      The error message will give you the EXACT FILE (and line number) the error is coming from. Something like:

      Parse error: syntax error, unexpected ';' in /home/yoursite/wp-content/plugins/some-plugin/some-plugin-file.php on line 413

      So as you can see, it gives you the path to the exact file the error is occurring in, and the exact line. With that info, you can either edit the file in question, or disable that particular plugin/theme (by renaming the plugin/theme folder or similar).

  4. Ashley, you are a breath of fresh air. Your instructions are clear and easy to follow – something most of us non-coder people are grateful for!!! I’m still struggling with my switch from blogger to wordpress but I will bookmark this page! You will now be my go-to for all that is wordpress and soon wordpress will be my bitch too!!! Thank you!!! 😉

  5. This happened to me once when I misspelled something and at first it freaked me out because I had no idea what was wrong. Thankfully, my hosting providers helped me fix it right away. Not a fun experience though. Great post!!

    Renee (Lover of Romance) recently posted: Library Loot (77)
  6. Wow, great information!!! I was able to easily follow your instructions and fix my errors. Thank you so very much!!!!

  7. THANK YOU SO MUCH!!!

    No word of a lie, I just spent god knows how long (a good hour at least!) trying to figure out how to delete the stupid code I wrongly inputted. After website after website telling me I needed to download filezilla and make a child themed page I was so close to smashing the glass currently next to me.

    But then I found your blog and THANK GOD I DID!

    How simple was that!

    I owe you one!

  8. Messing around today and got the White Screen of Death on a new site I am developing. Freaked out for most of the day thinking all was lost until I found your post. So easy to fix once you know where to look. Thanks.

  9. You just saved me with this! Am a bit of a noob and just trying to hack together something from various resources around the web, didn’t think I’d be so easily be able to break the entire file so I couldn’t get into my admin account at all. Thanks so much!

  10. Hey Ashley,

    Wonderful post, I was having trouble finding information on this topic. I also used the appearance editor and didn’t realize the danger compared to FTP programs. However, even after I went to my file manager and fixed the functions.php in my child theme (error was on line 13 & 18) the site is still giving the same error (but only on certain WooCommerce products). Any ideas why?

    “Fatal error: Cannot redeclare dequeue_woocommerce_cart_fragments() (previously declared in /home/proces39/public_html/wp-content/themes/kallyas-child/functions.php:113) in /home/proces39/public_html/wp-content/themes/kallyas-child/functions.php on line 118”

    1. Hi Jason 🙂

      That error means you have a function with the same name declared two times. Once on line 113 and another time on line 118. A function name can only be used one time.

      I suggest doing a CTRL+F search for “dequeue_woocommerce_cart_fragments”. You’ll probably have at least two results.

  11. Thank you so much for this, you saved my life! I was panicking so much after I got a fatal error from messing with my functions.php file… You’re a lifesaver!

Recent Posts

    Random Posts