Krustem

Member
Oct 3, 2021
7
0
1
Turkey
cPanel Access Level
Reseller Owner
Welcome
I need help installing wp cli on all accounts available on the server
You follow the guide below

After completion, I logged into one of the accounts on the server and used the wp --info command to check if the process was successful or not, but unfortunately it did not work on user accounts, but through the root connection it was successful

How can i enable wp cli on all user accounts

Thank you for your help
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,292
2,438
363
cPanel Access Level
Root Administrator
Hey there! When you say the command "did not work" can you provide me more details? Was the command not found at all? Did you receive an error when trying to execute it? Knowing that will likely be the key to helping you fix the problem.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,292
2,438
363
cPanel Access Level
Root Administrator
Thanks for the additional details. After you performed the installation, did you move the command to the /usr/local/bin location so it can be accessed by all users? You can run this as root to perform that work, running this from the directory where you performed the installation:

Code:
mv wp-cli.phar /usr/local/bin/wp
Since /usr/local/bin is part of every user's default path, I would expect that to work well.
 

ResellerWiz

Well-Known Member
Mar 24, 2023
101
44
103
USA
cPanel Access Level
Root Administrator
Twitter
You didn’t mention if whether or not you are using CloudLinux and CageFS.

If you are, you will need to force an update. Run the following command as root to do so:

cagefsctl --force-update
 
  • Like
Reactions: cPRex