Skip to main content

Add wp-cli to sub-cPanel accounts in WHM?

Comments

8 comments

  • Infopro
    What do you mean by sub cPanel accounts, Users created via the cPanel User Manager? Those users would not have SSH access.
    0
  • VM Creativo
    From your root account: Move to tmp dir cd /tmp
    Download WP-Cli curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
    Make it executable: chmod +x wp-cli.phar
    Move it to /usr/local/bin sudo mv wp-cli.phar /usr/local/bin/wp
    If your users have a Jail Shell, they will be able to use the command
    0
  • cPanelLauren
    While that advice is great for cPanel users @VM Creativo the original question was in regards to "subaccounts" which don't have SSH access. The only available subaccounts at this time are Email Users, Web Disk Users and FTP Users.
    0
  • rudtek
    @cPanelLauren I might have used the incorrect language, but I don't think so. In WHM I create accounts, each of them is has their own individual cpanel. Only the main cpanel that was on my VPS has access to CLI. Each of those accounts can have ssh (jailed or normal). I think what @VM Creativo stated may be the answer to what I am trying to accomplish. I'll attempt and report back.
    0
  • rudtek
    From your root account: Move to tmp dir cd /tmp
    Download WP-Cli curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
    Make it executable: chmod +x wp-cli.phar
    Move it to /usr/local/bin sudo mv wp-cli.phar /usr/local/bin/wp
    If your users have a Jail Shell, they will be able to use the command

    This seemed to work perfectly. One quick question. So now that I did this, do I have 2 versions of cli on my system? One that was previously installed and this one? or did this over-write the old with just with new permissions?
    0
  • rudtek
    What do you mean by sub cPanel accounts, Users created via the cPanel User Manager? Those users would not have SSH access.

    No i mean cpanel accounts created with WHM
    0
  • cPanelLauren
    Hi @rudtek Ahhh!! Thanks for clarifying, subaccounts do imply something entirely different than the cPanel users. I'm glad to hear that @VM Creativos advice worked out for you!!
    0
  • Vyron
    If you are using cloudlinux you may need to add: Next the path needs to be added to the cloud linux configuration file, you can do this by modifying the existing binunitls config file. edit '/etc/cagefs/conf.d/binutils.cfg' with a text editor of your choice such as vi or nano: nano /etc/cagefs/conf.d/binutils.cfg Add the following to the bottom of the file with the path using the path you chose in the move (mv) command above: [custom] comment=custom paths paths=/usr/local/bin/wp Next, we need cagefsctl to pick up the change by running the following command: cagefsctl --force-update You will see a number of files checked but you should see your path at the bottom as follows:
    0

Please sign in to leave a comment.