WordPress wp-cli "This does not seem to be a WordPress installation" in CI
WP-CLI walks up from the current directory looking for wp-load.php to bootstrap WordPress. In CI the checkout often has core in a subfolder (or not at all yet), so wp finds nothing and stops before running your command.
What this error means
Any wp ... command fails immediately with "Error: This does not seem to be a WordPress installation. Pass --path=path/to/wordpress or run wp core download."
Error: This does not seem to be a WordPress installation.
Pass --path=`path/to/wordpress` or run `wp core download`.Common causes
WordPress core is in a subdirectory
Bedrock and many setups keep core under web/wp or wordpress/, but the step runs wp from the repo root where there is no wp-load.php.
Core was never downloaded into the runner
A fresh checkout has only your theme or plugin, not WordPress itself, so wp has nothing to bootstrap.
How to fix it
Point wp at the core directory
- Locate the folder that contains
wp-load.phpin your checkout. - Pass it with
--pathon every wp call, or set it once inwp-cli.yml. - Re-run the command from any directory.
wp core version --path=web/wpDownload core first when it is not present
If the runner has no WordPress at all, fetch it before running wp commands.
wp core download --path=web/wp --skip-contentHow to prevent it
- Set
path:in a committedwp-cli.ymlso every wp call resolves core. - Run wp steps from the directory that holds
wp-load.php. - Download or restore core early in the job for plugin/theme-only repos.