WP-CLI: Error: This does not seem to be a WordPress installation. Pass --path=`path/to/wordpress` or run `wp core download`
WP-CLI couldn’t find WordPress in the current directory (or the --path given).
Seen on:
WordPress
Meaning
Run WP-CLI from the WordPress root, or pass --path. In Bedrock/custom layouts, wp-cli.yml should point to the web/wp folder. Using sudo can change the working directory or user.
Common causes
- Running wp from the wrong directory
- Custom layout (Bedrock, subfolder install) without wp-cli.yml
- wp-config.php outside the expected location
⚡ Quick fix
- cd to the WordPress root or use --path=/var/www/html
- Add wp-cli.yml with path: web/wp
- Run as the web user: sudo -u www-data wp …
Detailed fix by platform
Shell
- php
wp --path=/var/www/html core version echo "path: web/wp" > wp-cli.yml
How to diagnose
- Directory — pwd contains wp-load.php?
- Layout — Bedrock/subfolder?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in WordPress
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026