[Drupal] 7 Common ways to get through white screen death error in drupal 8

| | 1 min read

I got assigned with a task of executing drupal-8 migrations. The only way to migrate data into Drupal 8 is through Drush. While I was progressing through working with Drupal-7 to Drupal-8 migration we got stuck with white screen death.

So we find out following are the methods to correct this error.

  • Rebuilt site's Dependency Injection Container (DIC).
    Run update.php ,after running also if you got this error try to delete php folder in sites/all/default/files
  • Clearing cache
    Try to clear site cache from /admin/config/development/performance
    using drush
    try with drush, a command line for Drupal8
     drush cr
  • Checked database is running or not.
  • If you have changed any code in your custom module try to reinstall the module
  • Try to remove everything in files/php directory.
  • May be this error due to settings.php file is already populated but your database is empty.(when you're trying to re-install, and settings.php have no write permissions)

    • Copying default.settings.php over settings.php
    • Give write permission for settings.php
  • Check your module missing any required use statements
    for example:
    use Drupal\Component\Utility\String;
     ;;
     String::checkPlain
  • Check opcode cache configurations
    OPcache for example requires the following settings,
     php_admin_flag[opcache.load_comments] = on
      php_admin_flag[opcache.save_comments] = on