1

I'm stuck trying to do the remote SSH with WP-CLI.

I have installed WP-CLI on my Webfaction server and tested it's working

# This is in server

$ wp --info

OS:     Linux web561.webfaction.com 3.10.0-862.14.4.el7.x86_64 #1 SMP Wed Sep 26 15:12:11 UTC 2018 x86_64
Shell:  /bin/bash
PHP binary:     /usr/local/bin/php56
PHP version:    5.6.40
php.ini used:   /usr/local/lib/php56/php.ini

But whenever I tried to do remote access (I'm on Windows10 using GitBash), I get this error:

# This is in my local comp

$ wp @staging --info

myaccount@web561.webfaction.com's password:
bash: wp: command not found

I'm sure there's nothing wrong with the @staging alias.

Path is definitely correct too because when I change it to non-existent directory, it gives No such file or directory error.

Have anyone experienced this problem before?

Thanks

  • 1
    Can you access wp directly? php /path/to/wp-cli.phar @staging --info – MikeNGarrett Jun 13 at 16:03
  • Thanks for the reply. Yes, I already set the PATH and can call wp within bash. – hrsetyono Jun 13 at 16:05
1

Found a solution here https://github.com/hrsetyono/wordpress/wiki/WP-CLI-on-Webfaction .

This seems to be Webfaction specific issue

You simply need to open FTP and append this line in /home/yourname/.bashrc

export PATH=$PATH:$HOME/bin

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.