Install wp-cli on a specific domain or globally

Hey guys,

Can you help me to install wp-cli on a specific domain and globally, eventually? I prefer to install it on specific domain only, if that’s possible.

Thank you in advance!

Hi,

Hestia installs it per user, not per domain:

v-add-user-wp-cli YourUser

Thanks, it’s working great!

Just one question: do I need to execute it like this every time, because I’m not able to log in as the user (no shell).

sudo -u user php /home/user/.wp-cli/wp \

–path=/home/user/web/muudhost.eu/public_html \

core version

If the user doesn’t have a shell, then you must run the command from root user, using sudo, runuser or v-run-cli-cmd

If the command you need to run is repetitive, you could add a cron job for that user.

Running a cron job instead did the trick, that’s what I was looking for at the first place. Thanks so much for everything! Have a good one!