I've followed the instructions provided on the wp-cli.org site but I can't seem to get the wp
command to run for all users.
I copied the file to /usr/local/bin
and renamed it to wp
per the instructions. And when I'm logged in as root I can run wp from anywhere and it works (although it gives me the "are you sure you want to run this as root?" warning).
I was under the impression that moving an executable to /usr/local/bin
would make that executable available to all users. However, when I switch to another user, I get a "command not found" error.
How can I install wp-cli for all users? I want to make sure every user with SSH access can run wp-cli.
Thanks in advance!
/usr/local/bin
to thePATH
globally./usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/cpanel/composer/bin:/home/iansvoboda/.local/bin:/home/iansvoboda/bin
The problem is that the binarywp
isn't present in/usr/local/bin
for non-root users. Also, I'm running WHM, so I suppose there could be some security restriction or something on 3rd party binaries?/usr/local/bin/wp
?-bash: /usr/local/bin/wp: No such file or directory
This is what I would expect, since as I said the binary doesn't appear to be present in that directory for a non-root user. I have no idea why though./usr/local/bin/
to be the same for everybody. But that command works for you asroot
?