2

I Have Godaddy Deluxe linux hosting it is shared server, so I don’t have the root password of the machine.

I can create, move and delete files via SSH in my home folder but not in the root directories like /opt /etc.

curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

php wp-cli.phar --info

chmod +x wp-cli.phar

sudo mv wp-cli.phar /usr/local/bin/wp

I am not able to execute the sudo command.

Can anyone gives me alternate way for installing it?

closed as off-topic by Mark Kaplun, Wyck, Johannes Pille, Pieter Goosen, birgire Sep 8 '14 at 11:08

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Your question should be specific to WordPress. Generic PHP/JS/HTML/CSS questions might be better asked at Stack Overflow or another appropriate site of the Stack Exchange network. Third party plugins and themes are off topic." – Mark Kaplun, Wyck, Johannes Pille, Pieter Goosen, birgire
If this question can be reworded to fit the rules in the help center, please edit the question.

  • You probably better ask the wp-cli developers. You can't sudo if you don't have server root like privileges which you will not get on shared hosting, but I don't understand why that step is needed at all. – Mark Kaplun Sep 6 '14 at 15:36
  • these commands are from the official documentations – Rahul V Sharma Sep 6 '14 at 16:10
3

the default instructions assume you have root and are intended to provide the most convenient use by placing the phar package in your path

alternative 1:

remove the sudo, change /usr/local/bin/wp to /path/to/your/installation/wp, and instead of calling the commands with wp command <parameters> use ./wp command <parameters>

alternative 2:

remove the sude, change /usr/local/bin/wp to /any/other/path/wp and instead of calling commands with wp command <parameters> use /any/other/path/wp command <parameters>

  • if word-press installed in public_html/folder so i have to put wp-cli.phar in same folder. and whenever i have to perform wp-cli command... i have to type ./wp command <parameters> ? – Rahul V Sharma Sep 7 '14 at 4:40
  • you would need to rename wp-cli.phar to just wp, but yes that's one of the methods – karpstrucking Sep 7 '14 at 20:20

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