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>/.
- Check if
../../../wp-config.phpexists (standard depth from theme/plugin root). - If not, check
../../../../wp-config.php(nested projects likeplugin/src/). - If still not found, run:
and ask the user to confirm the correct path.find / -maxdepth 5 -name wp-config.php -not -path '*/vendor/*' 2>/dev/null | head -5 - Store the resolved path as
WP_CONFIG. - Derive
WP_CONTENT— thewp-content/directory (parent ofthemes/orplugins/). - Derive
DEBUG_LOGas$WP_CONTENT/debug.log.