Title: Using WP CLI on CloudLinux/cPanel server without shell
Last modified: June 12, 2021

---

# Using WP CLI on CloudLinux/cPanel server without shell

 *  [p42john](https://wordpress.org/support/users/p42john/)
 * (@p42john)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/using-wp-cli-on-cloudlinux-cpanel-server-without-shell/)
 * This may not be the right forum, but I didn’t see anyplace else that seems appropriate
   for system administrative questions pertaining to WP CLI.
 * I have several shared hosting servers that are built on CloudLinux and WHM/cPanel
   and the user accounts do not have shell access. I also have a script that allows
   me to quickly install WordPress on a user account, but it is pretty raw and could
   be vastly improved with WP CLI. I login via SSH with EC key pairs, and there 
   is an external gateway/firewall in front of the servers that allows port 22 only
   from specific administrative IP addresses. So my administrative user is the root
   user. I currently run my script as root.
 * The wp command throws up a strong warning about running as root. It suggest I
   use the command `sudo -u USER -i -- wp <command>` instead. To do so I would have
   to enable jailed user shells for all users. Due to a feature in CloudLinux called
   Link traversal protection and the way it manages chroot filesystems between users,
   doing so forces you to choose between two bad options, both of which I would 
   like to avoid.
 * Running instead as `sudo -u USER wp <command>` allows it to run without the interactive
   user shell and it will then work without having to enable jailed user shells 
   for all users. The users exist, but by dropping the `-i` switch and the double
   hyphen I am not requiring an interactive login shell.
 * So what are the consequences of using the wp command without the interactive 
   login shell. Will using `sudo -u USER wp <command>` instead of `sudo -u USER -
   i -- wp <command>` break anything?
 * Thank you.

Viewing 1 replies (of 1 total)

 *  [corrinarusso](https://wordpress.org/support/users/corrinarusso/)
 * (@corrinarusso)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/using-wp-cli-on-cloudlinux-cpanel-server-without-shell/#post-14585429)
 * This is more of a server/groups/user question imo.
    However, I’ve certainly never
   been able to sudo before, so you’re already ahead of the game!
 * I can’t see how the switch between using the -i paramter vs. not using it would
   make any difference. WordPress itself certainly should not care. Your user needs
   access to the wp cli – that’s pretty much it.
 * Obviously, just test it all first and compare results:
    [https://make.wordpress.org/cli/handbook/guides/commands-cookbook/](https://make.wordpress.org/cli/handbook/guides/commands-cookbook/)

Viewing 1 replies (of 1 total)

The topic ‘Using WP CLI on CloudLinux/cPanel server without shell’ is closed to 
new replies.

## Tags

 * [root](https://wordpress.org/support/topic-tag/root/)
 * [wp-cli](https://wordpress.org/support/topic-tag/wp-cli/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [corrinarusso](https://wordpress.org/support/users/corrinarusso/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/using-wp-cli-on-cloudlinux-cpanel-server-without-shell/#post-14585429)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
