Guides › WordPress › Site down or error screens

How to Turn On WordPress Debug Mode and Read the Error Log

Find the real error behind a blank page or vague message by logging errors to a file without showing them to visitors.

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.

WordPress hides errors by default. Debug mode writes them to a file so you can read them safely.

Step 1: Back up and open wp-config.php

Open wp-config.php in your site's root folder. Find the line /* That's all, stop editing! */.

Step 2: Add these lines above it

Replace any existing WP_DEBUG line:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

WP_DEBUG_DISPLAY set to false keeps errors off the public pages.

Step 3: Reproduce the problem and read the log

Load the broken page once. Then open wp-content/debug.log in File Manager. The newest lines are at the bottom. Each line names the file and line number. A path with /plugins/name/ or /themes/name/ tells you which one is at fault.

Step 4: Fix what it names

Step 5: Turn it off again

Set WP_DEBUG back to false when you finish and delete debug.log. The log can reveal file paths and other details, and it grows over time. Do not leave debug mode on in a live site.

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.