Skip to main content

How to Troubleshoot a Blank or White PHP Page

A blank or white page (often called the "White Screen of Death") occurs when a PHP script encounters a fatal error but is configured to hide the specific error message from the public. This issue affects the website's ability to load content for...

A blank or white page (often called the "White Screen of Death") occurs when a PHP script encounters a fatal error but is configured to hide the specific error message from the public. This issue affects the website's ability to load content for visitors and can be resolved by identifying the underlying script error.

Before you begin

You will need:

  • Access to your website's hosting control panel (such as cPanel or Windows Control Panel).

  • Access to the website's file manager or an FTP client.

  • The ability to modify configuration files or toggle settings within your website's management dashboard (e.g., WordPress).

Check for a PHP fatal error

A blank page is most commonly caused by a PHP fatal error, which often results from an incompatible plugin, a theme conflict, or a syntax error in the code.

  1. Log in to your hosting control panel.

  2. Locate the Select PHP Version or PHP Manager tool.

  3. Check the current PHP version.

  4. If you recently updated your PHP version, try reverting to the previous version to see if the site returns.

  5. If the site returns, the issue is caused by a code incompatibility with the newer PHP version.

Enable PHP error reporting

If the site remains blank, you must enable error reporting to see the specific message causing the failure.

  1. Access your website's root directory via a File Manager or FTP client.

  2. Locate the php.ini or .user.ini file in the root directory.

  3. Find the line for display_errors.

  4. Change the value to On: display_errors = On

  5. Save the file and refresh your website.

Warning: Only enable display_errors temporarily for troubleshooting. Displaying errors on a live production site can reveal sensitive information about your server configuration and file paths to the public.

Identify the faulty script

Once errors are visible, the browser will display a specific error message.

  1. Refresh the page until the error message appears.

  2. Read the error message to identify the file path and the line number where the error occurs.

  3. Note the name of the folder and the file involved.

  4. If the path includes a plugin or theme folder (e.g., /wp-content/plugins/plugin-name/), that specific component is causing the issue.

  5. If the error is in a core system file, the issue may be related to a failed update or a configuration error.

Disable the problematic component

Once you have identified the source of the error, disable that component to restore site access.

  1. If a plugin is the cause, rename the folder of that plugin in your file manager (e.g., rename plugin-name to plugin-name_old).

  2. If a theme is the cause, switch to a default theme by editing your site's configuration file (e.g., wp-config.php or functions.php).

  3. Refresh your website.

Confirm the result

  • The website should load successfully without showing a blank page.

  • If you enabled display_errors in a configuration file, ensure you turn it off (set to Off) once the issue is resolved.

If the site remains blank after disabling components

If the site is still blank after you have disabled the suspected plugin or theme, the issue may be related to a corrupted core file or a server-side configuration limit.

  1. Check your PHP memory limit.

  2. Verify that the file permissions for your folders are set to 755 and files to 644.

  3. Contact Hostek support and provide the specific error message you see when display_errors is turned on.

Did this answer your question?