Thursday, December 24, 2009

How to fix Drupal White Screen of Death/ blank screen

When installing or configuring (or sometimes when just using) the popular CMS (content management system) Drupal you'll be faced with the dreaded WSOD (white screen of death).

This is often because your hosting set up isn't allowing the memory hungry Drupal a big enough bite of the server's memory pie. There are several suggestions throughout the web that this can be fixed by appending the php.ini file in the root of your site, although you may struggle to find php.ini for various reasons.

I build Drupal sites in a cloud/ application server environment and believe I have found a far more effective way of solving the Drupal white screen error.

Fixing the Drupal white screen error using Settings.php
  1. Browse to YOURSITE/sites/default and (after making a backup of it) open up settings.php
  2. Scroll down to the section labelled as PHP settings, if you're using a code editor like DreamWeaver this starts at line 128
  3. Below the line ini_set('url_rewriter.tags', ''); add another line like this - ini_set('memory_limit' , '300M');
Depending the exact details of your hosting this should solve your white screen errors.