Skip to content

Drupal White Screen of Death Fix

DodaTech Updated 2026-06-24 1 min read

In this tutorial, you'll learn about Drupal White Screen of Death Fix. We cover key concepts, practical examples, and best practices.

The Problem

Your Drupal site shows a completely blank white page. No error message, no HTML output. The admin pages are also blank. PHP encountered a fatal error but error reporting is disabled.

Quick Fix

Step 1: Enable error reporting

$config['system.logging']['error_level'] = 'verbose';
error_reporting(E_ALL);
ini_set('display_errors', TRUE);

Step 2: Check PHP error log

tail -100 /var/log/apache2/error.log | grep "PHP"

Step 3: Increase PHP memory

ini_set('memory_limit', '256M');

Step 4: Disable modules via Drush

drush pm:list --status=enabled
drush pm:disable module_name
drush cr

Step 5: Check for syntax errors

php -l sites/all/modules/custom/my_module/my_module.module

Prevention

  • Enable verbose logging only on development sites.
  • Test modules on staging before production.
  • Keep Drupal core updated.

Common Mistakes with white screen

  1. Overlapping type class instances that cause GHC to reject the program with ambiguous dispatch errors
  2. Non-exhaustive pattern matches that compile with warnings then crash at runtime
  3. Misunderstanding that String is [Char] with poor performance for large text operations

These mistakes appear frequently in real-world DRUPAL code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.

Practice Exercise

Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.

This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.

FAQ

### What causes the Drupal White Screen of Death?

PHP memory exhausted, fatal error in a module, PHP version incompatibility, or corrupted module files.

How to fix without access to settings.php?

Use Drush: drush sql:query "UPDATE system SET status=0 WHERE name='problem_module'" && drush cr.

Can a missing PHP extension cause the white screen?

Yes. Drupal requires mbstring, gd, pdo_mysql, xml, json. Run php -m to check.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro