Check reference

WordPress configuration

What it checks

Checks WP_DEBUG, WP_DEBUG_DISPLAY, debug.log, wp-config.php permissions and the built-in file editor.

Check ID: env.wp_config

  • WP_DEBUG and WP_DEBUG_DISPLAY.
  • Whether a debug log exists: the path in WP_DEBUG_LOG, or wp-content/debug.log.
  • The permissions of wp-config.php, in the WordPress folder or the folder above it (not on Windows servers).
  • Whether the theme and plugin file editor is available (DISALLOW_FILE_EDIT or DISALLOW_FILE_MODS is not set).

What a finding means

The titles, severities and explanations below are the ones shown on the Findings screen.

FindingSeverityMeaning
Debug messages are shown to visitors
wp_config.debug_display
HighWP_DEBUG is on and WP_DEBUG_DISPLAY is not off, so PHP notices and errors appear on pages and reveal file paths.
WP_DEBUG is enabled
wp_config.debug
LowDebug mode is on. It is meant for development and can slow the site and fill the log.
debug.log exists
wp_config.debug_log
Medium LowA debug log is stored inside wp-content, where it may be downloadable. Logs can contain paths, queries and personal data.
Medium: the log is inside wp-content. Low: the log is elsewhere.
wp-config.php is world-writable
wp_config.permissions_writable
Criticalwp-config.php has permissions …. Anyone on the server can change it.
wp-config.php is readable by everyone on the server
wp_config.permissions_readable
Lowwp-config.php has permissions …. On shared servers other accounts may be able to read your database password.
Theme and plugin file editor is enabled
wp_config.file_edit
LowAdministrators can edit PHP files from the dashboard. A stolen admin account can then run arbitrary code.

How to fix

The recommended action shown with each finding:

  • Debug messages are shown to visitors
    Set define( 'WP_DEBUG', false ) on production, or at least define( 'WP_DEBUG_DISPLAY', false ).
  • WP_DEBUG is enabled
    Set define( 'WP_DEBUG', false ) on production.
  • debug.log exists
    Delete the log when it is no longer needed, and set WP_DEBUG_LOG to a path outside the web root.
  • wp-config.php is world-writable, wp-config.php is readable by everyone on the server
    Set the permissions to 400 or 440 (600/640 if your host requires write access).
  • Theme and plugin file editor is enabled
    Add define( 'DISALLOW_FILE_EDIT', true ); to wp-config.php.

Related settings

  • Settings → Checks → Enabled checks: switch “WordPress configuration” on or off.