Categories
Drupal Development Resources

Drupal’s White Screen of Death

So you’re building your Drupal website and everything is moving along just fine. Everything is working fine, then all of the sudden… nothing. You view the page source and there’s no code on the page. You’ve encountered the infamous Drupal white screen of death (WSOD for short).

You may worry your site disintegrated. All that hard work and then nothing. Fear not! It’s likely a simple fix.

Some pages appear as a blank white screen.

You may some pages that fail to load and appear as a blank white page with no markup in the source. Most common pages are admin pages like the “modules” page (either the list of module or while enabling/disabling specific modules) and complicated Views.

Issue:

Most likely low PHP memory. Some admin pages or modules take up a lot of memory (RAM) to generate the page. The two most common areas we run into is the modules admin page or when uploading a large image (Imageapi & Imagecache are particularly memory intensive when processing large files). Occasionally, some modules may cause all pages to have the WSOD if they’re active globally.

Solution 1:

Increase your PHP memory limits.

If you’re on a shared server, you may be able to change it in your .htaccess file or settings.php for your site. Most shared servers will have a PHP limit of around 32MB-64MB. If this method doesn’t work, you may need to consider upgrading to a dedicated server or a shared host with higher memory limits.

Solution 2:

Disable unneeded modules or the offending module. If you’re experiencing the WSOD after enabling the module and can’t get back to your your modules admin page to disable it, you can try disabling it directly in the database.

Look through the “system” table and change the “status” value to “0” to disable.

All pages have the WSOD after migrating to a different server or URL

Your theme is working perfectly on your development environment then your site suddenly doesn’t load after you’ve migrated it to a new server or address.

Issue:

When you have a custom theme you’ve developed on a local or development server/URL, Drupal tends to “remember” the original URL of the development site. When migrating to a new server or folder/address on the same server, Drupal may not recognize the theme folder at the new address. When it can’t find the theme, it loads the WSOD.

Solution:

Before migrating your site, set the theme one of Drupal’s core themes such as “Garland” (Drupal 6) or “Bartik” (Drupal 7). If you can’t do that, you can edit theĀ $conf->theme_defaultĀ value in your settings.php to one of the core themes.

$conf = array(
   'site_name' => 'My Drupal site',
   'theme_default' => 'minnelli',
   'anonymous' => 'Visitor',
);

Log in as the admin user. Drupal should discover your “themes” folder with the custom theme. Set it to your theme and save. Edit your settings.php file and comment out the ‘theme_default’ (or the whole $conf array).

For a more comprehensive guide, check out the post on Drupal.org

2 replies on “Drupal’s White Screen of Death”

Hi,

Greats article. I have been migrating Drupal site to server, it runs OK for anonimous user but when I logged in I have getting WSOD (White Screen of Death). I disabled devel, admin_menu modules but nothing changes. Please help.

Thanks,
Wirka

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.