How to Enable WordPress Debug Mode

Knowledgebase / How to Enable WordPress Debug Mode

How to Enable WordPress Debug Mode

0 found helpful (0 votes) ...
Back to Knowledgebase

WordPress debug mode displays PHP errors and warnings on your website. It is useful for diagnosing problems but should only be enabled temporarily and never left on on a live website.

Step 1 — Edit wp-config.php

  1. Log in to cPanel and open File Manager.
  2. Navigate to your WordPress folder (usually public_html).
  3. Find wp-config.php, right-click it, and select Edit.

Step 2 — Enable debug mode

Find the line:

define('WP_DEBUG', false);

Replace it with the following three lines:

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

Click Save Changes.

What these settings do

  • WP_DEBUG true — enables debug mode
  • WP_DEBUG_LOG true — writes errors to a log file at wp-content/debug.log instead of showing them on screen
  • WP_DEBUG_DISPLAY false — hides errors from site visitors (important for live sites)

Reading the debug log

Open File Manager and navigate to public_html/wp-content/debug.log. This file lists all PHP errors and warnings with the file name and line number where they occurred.

Disable debug mode when done

Set WP_DEBUG back to false once you have finished troubleshooting. Leaving debug mode on can expose sensitive information to visitors.


Was this article helpful?



Still need help?

Open a support ticket →

On This Page