Skip to content

Use WordPress debug settings

Temporarily enable WordPress debugging and write diagnostic messages to a log.

Where Apps โ†’ WordPress โ†’ Toolkit โ†’ Debug

Enhance WordPress Toolkit debug settings

What this is for

  • Enable WordPress debug mode.
  • Write errors to wp-content/debug.log.
  • Control whether errors are displayed to visitors.

Before you start

  • Record the time and steps that reproduce the fault.
  • On a public site, plan to keep on-screen error display disabled.

Take care

Displayed errors can reveal paths, code details or personal data. Do not leave WP_DEBUG_DISPLAY enabled on production.

Steps

  1. 1

    Reproduce the issue and note the time before changing debug settings.

  2. 2

    Open Toolkit and choose Debug.

  3. 3

    Enable WP_DEBUG and WP_DEBUG_LOG.

  4. 4

    Keep WP_DEBUG_DISPLAY off on a public production site.

  5. 5

    Reproduce the issue, read wp-content/debug.log and save the relevant evidence.

  6. 6

    Disable debug options after diagnosis and remove logs containing sensitive data when appropriate.

Check it worked

  • Reproducing the issue adds a relevant entry to wp-content/debug.log.
  • After troubleshooting, all temporary debug switches are off and sensitive log data is removed or protected.

What the controls do

Control What it means
WP_DEBUG Enables WordPress diagnostic mode.
WP_DEBUG_LOG Writes messages to wp-content/debug.log.
WP_DEBUG_DISPLAY Displays diagnostic messages in page output.