Knowledgebase

Enabling WP_DEBUG and Finding Your Error Logs Print

  • wordpress, errors, cpanel, troubleshooting, php, filemanager, plugins, themes, performance, diskspace
  • 0

When something breaks, the log tells you exactly what failed. Guessing is slower.

WordPress debug log

Edit wp-config.php and add above the "stop editing" line:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);

Reproduce the problem, then read wp-content/debug.log via File Manager. Setting DISPLAY to false keeps errors hidden from visitors while still recording them.

cPanel error log

cPanel → Metrics → Errors shows the last few hundred web server errors for your account, including PHP fatals and permission problems.

Raw logs

cPanel → Metrics → Raw Access lets you download full access logs, useful for identifying bot traffic or tracing when a problem started.

Reading a log entry

A typical fatal error names the error type, the file path and the line number. The file path tells you which plugin or theme is responsible — that is usually all you need to know.

Turn WP_DEBUG off again when you are finished, and delete debug.log. On a busy site it can grow to gigabytes and fill your disk quota.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot