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?

  • 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. Sep 6, 2014 at 15:36
  • these commands are from the official documentations Sep 6, 2014 at 16:10

1 Answer 1


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> ? Sep 7, 2014 at 4:40
  • you would need to rename wp-cli.phar to just wp, but yes that's one of the methods Sep 7, 2014 at 20:20

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