Note: Make sure you're enabling this only on development server.

It's very common for any developers to make a mistake while developing, which will result in White Screen of Death (WSOD). WSOD is normally because PHP error reporting is turned Off.

Here's how you can enable error reporting using PHP.ini file:

  • Open PHP.ini file located at "/etc/php5/apache2/php.ini" using your favorite editor
  • Find and update following variables:
    error_reporting = E_ALL
    display_errors = On

If you don't have access or write permission to php.ini, you can still enable error reporting using index.php file:

  • Open index.php file located at "/project-root/index.php" using your favorite editor
  • Add below line of code after the first opening PHP tag:
    <?php
    error_reporting
    (E_ALL);
    ini_set('display_errors', TRUE);
    ini_set('display_startup_errors', TRUE);
    ?>

Reference: