When WordPress breaks silently — a blank page, a missing feature, a mysterious slowdown — debug mode is your flashlight. It surfaces the underlying PHP errors that are normally hidden. Here’s how to switch it on without exposing errors to your visitors.
The three lines that matter
Open wp-config.php in cPanel’s File Manager and find the line about WP_DEBUG. Replace it with these three lines:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
Here’s what each does: WP_DEBUG turns error reporting on; WP_DEBUG_LOG writes those errors to a file instead of showing them; and WP_DEBUG_DISPLAY set to false keeps them off the screen so visitors never see them. That combination is the safe way to debug a live site.
Where the errors go
With logging on, errors are written to wp-content/debug.log. Reproduce the problem, then open that file in File Manager. The most recent entries at the bottom point to the exact plugin, theme file or line of code causing trouble.
Reading the log
Log entries name the file path and line number. If you see repeated warnings mentioning a specific plugin’s folder, that plugin is the source. Fatal errors are the ones that break the site; warnings and notices are less serious but worth noting, as they can hint at future problems.
Turn it off when you’re done
Debug mode isn’t meant to run permanently on a live site. The log file grows over time and can even hint at your structure to anyone who finds it. Once you’ve solved the problem, set WP_DEBUG back to false and delete the debug.log file.
Going deeper with query monitoring
For performance issues rather than outright errors, a query-monitoring plugin complements debug mode by showing slow database queries, which plugin triggered them, and how long each page takes to build. It’s the natural next step when the debug log doesn’t reveal an obvious fault.
Debug mode is the difference between guessing and knowing. If the log surfaces something server-side that you can’t place, copy the relevant lines into a ticket and we’ll interpret them for you.