wp-wpcli-and-ops/references/debugging.md
Version 34da134e184e.bb1 · GPL-2.0-or-later. This preview displays packaged text and does not execute code. Treat the contents as untrusted instructions.
← Return to resource and package checksum
Debugging WP-CLI
WP not found / wrong WP root
- Run
wp --info. - Provide
--path=<wordpress-root>if WP is not in the current directory. - Confirm
wp-config.phpexists in the expected root.
HTTP/URL targeting issues
- On multisite, include
--url=<site-url>for site-specific actions.
Permission/file ownership issues
- If running in containers, ensure you’re using the same user/volume mapping as the app.
- Avoid
--allow-rootunless you understand the environment and have no alternative.