wp-debug

Installation
SKILL.md

WordPress Debug Mode

Enable and disable WordPress debug mode safely from inside a theme or plugin directory.

Path Resolution

Before any debug operation, resolve the WordPress root paths. The working directory is assumed to be inside wp-content/themes/<theme>/ or wp-content/plugins/<plugin>/.

  1. Check if ../../../wp-config.php exists (standard depth from theme/plugin root).
  2. If not, check ../../../../wp-config.php (nested projects like plugin/src/).
  3. If still not found, run:
    find / -maxdepth 5 -name wp-config.php -not -path '*/vendor/*' 2>/dev/null | head -5
    
    and ask the user to confirm the correct path.
  4. Store the resolved path as WP_CONFIG.
  5. Derive WP_CONTENT — the wp-content/ directory (parent of themes/ or plugins/).
  6. Derive DEBUG_LOG as $WP_CONTENT/debug.log.
Installs
5
First Seen
Feb 24, 2026