In this guide, I talked about adding WP-CLI to your system, but if you use cPanel with CloudLinux, you also need to include it in CageFS so that all users can access the wp command.
First, download the WP-CLI command inside /usr/local/bin
cd /usr/local/bin
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
mv wp-cli.phar wp
chmod +x wp
Add WP-CLI path to CageFS:
nano /etc/cagefs/conf.d/wpcli.cfg
and inside add:
[wpcli]
comment=Allow wp-cli to work on the server
paths=/usr/local/bin/wp

save the file, then update CageFS to include the change:
cagefsctl --force-update

Was this post helpful?
Let me know if you liked the post. That’s the only way I can improve. 🙂