versionpress / support

Unofficial support for VersionPress. Note that VersionPress is currently not being developed: https://github.com/versionpress/versionpress/issues/1481.
19 stars 7 forks source link

sh: wp: command not found halfway through wp vp clone process #61

Closed jasonyingling closed 8 years ago

jasonyingling commented 8 years ago

When I'm trying to run wp vp clone --name=staging I'm getting sh: wp: command not found right before the creating the database step. Output looks like this:

Success: Site files cloned Success: Updated remote configuration Success: Enabled pushing to the original repository Success: Enabled pushing to the clone Success: wp-config.php updated Success: Copied VersionPress sh: wp: command not found

I could not find anything to help guide me to the error of my ways. Trying to run on MAMP Pro with php7.0.8

A few things I've tried:

Added /Applications/MAMP/bin/php/php7.0.8/bin to my PATH Created an alias for 'php /Applications/MAMP/bin/php/php7.0.8/bin/wp-cli.phar'

Running wp --info gets me:

PHP binary: /Applications/MAMP/bin/php/php7.0.8/bin/php PHP version: 7.0.8 php.ini used: /Applications/MAMP/bin/php/php7.0.8/conf/php.ini WP-CLI root dir: phar://wp-cli.phar WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 0.24.1

Seems odd that it runs wp commands fine until it gets to the point where it should be creating the DB. I am also able to create a DB with the wp-cli wp db create commmand as well.

borekb commented 8 years ago

What it comes down is that the code calls Symfony\Process->run(). You can try creating a test PHP script that would just include Symfony\Process package and call the run() method with some wp command. If this errors out for you, it's the root cause.

Calling the run() function: see our VPCommandUtils::exec() method.

borekb commented 8 years ago

Closing this for now, please reopen if you need further assistance.

srimaln91 commented 7 years ago

Were you able to find a solution for this? I got puzzled with the same issue. selection_005

selection_006

pavelevap commented 6 years ago

Only adding note that there is related support issue: #81. And currently you can define absolute path to WP-CLI by using VP_WP_CLI_BINARY constant, see details here: https://github.com/versionpress/versionpress/issues/1186