Guides › HTML / PHP sites › Site down or error screens

PHP Site Shows a Blank Page or 500 Error: How to See the Real Error

A PHP page is blank or gives error 500. Turn on error logging safely, read the message and fix the line it names.

Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.

A blank page or a 500 error from a PHP file usually hides a PHP error, because servers hide errors from visitors for safety. You need to read them yourself.

Step 1: Check the error log

Your hosting panel has an Error log page. It names the file, the line and the problem. Look at the newest lines.

Step 2: Show errors while testing

At the very top of the failing PHP file, add:

ini_set( 'display_errors', '1' );
error_reporting( E_ALL );

Reload the page. A syntax error in the same file may stop these lines from running, so use the log or your host's PHP settings in that case.

Step 3: Read the message

Step 4: Check .htaccess

A wrong line in .htaccess causes a 500 error. Rename it temporarily to test.

Step 5: Turn display off again

Remove the display_errors line when finished. Showing errors to visitors can leak file paths and other private details.

Related guides

Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.

Last updated 2026-11-21.