A completely blank page from a PHP site usually means a fatal error happened while display_errors is off, which is correct on production. The error was still recorded somewhere. This guide shows how to find it and fix a PHP blank white page quickly and safely.
Before you start
- Note when it started: after an update, a plugin install, a PHP version change or editing a file.
- Access to File Manager or SSH.
Check the HTTP status first
curl -sI https://example.com | head -1- 500: a PHP fatal error or server misconfiguration.
- 200 with empty body: PHP ran but output nothing, often a fatal error with output buffering, or an
exitin code. - 502/504: the PHP backend crashed or timed out, a different problem.
Find the PHP error log
| Environment | Where to look |
|---|---|
| cPanel | error_log file in the site's folder, or cPanel → Metrics → Errors |
| VPS with PHP-FPM | /var/log/php8.3-fpm.log and the web server error log (/var/log/nginx/error.log) |
| Custom setting | The error_log value shown in phpinfo() |
| WordPress | wp-content/debug.log once WP_DEBUG_LOG is enabled |
| Laravel / Symfony | storage/logs/laravel.log / var/log/ |
Enable error logging if nothing is logged
Make PHP log errors without showing them to visitors. On cPanel, set these under Select PHP Version → Options or in a .user.ini file in the site root:
log_errors = On
display_errors = Off
error_log = /home/USER/php_errors.log
error_reporting = E_ALLOn a VPS put the same in the PHP-FPM php.ini or pool (php_admin_value[error_log]) and reload PHP-FPM. Load the page again, then read the log.
Warning: only turn on display_errors briefly on a staging copy or while you test. Error output can reveal paths, queries and credentials to visitors.
Common fatal errors and fixes
- Parse error: syntax error, unexpected ...: a typo in a recently edited file (missing semicolon or bracket). The message gives the file and line; undo the edit.
- Call to undefined function mysql_connect() or similar: old code on a new PHP version. Switch the PHP version back or update the code.
- Class "..." not found / Call to undefined function imagecreatetruecolor(): a missing PHP extension; enable it in cPanel or install it on the VPS.
- Allowed memory size exhausted: raise
memory_limitor fix the heavy code. - Failed opening required ... vendor/autoload.php: Composer dependencies are missing; run
composer install. - Cannot redeclare function: two plugins or files define the same function; disable one.
CMS-specific shortcuts
- WordPress: rename
wp-content/pluginsto disable all plugins, or switch to a default theme by renaming the active theme folder. Recovery mode emails also name the culprit. - Joomla: set Error Reporting to Maximum in
configuration.php($error_reporting = 'maximum'). - Laravel: set
APP_DEBUG=trueonly temporarily on non-public environments.
Check the fix
Reload the page and confirm the error stops appearing in the log. Then set error reporting back to normal production values.
Troubleshooting
- Log file stays empty: PHP cannot write to the log path; choose a path the PHP user owns.
- Blank page only for logged-in users or admin: the fatal error is in admin-only code, often a plugin's settings page.
- Blank page after changing .htaccess: an invalid directive causes a 500; check the web server error log and undo the change.
PHP blank page FAQ
Why doesn't PHP show the error?
Production settings hide errors from visitors for security. They are logged instead.
Can a white screen be a caching issue?
Yes, a cached empty page from a crash can persist; purge the page cache after fixing the error.
Is this the same as the WordPress white screen of death?
Yes, the WordPress version is a PHP fatal error with display turned off; the steps above apply.
