cpanel-wp-cli
Hi,
I know I can install wp-cli via yum, but doing a yum search or yum list installed shows this:
bash-4.2# yum list installed | grep wp-cli
cpanel-wp-cli.noarch 2.1.0-2.2 @cpanel-addons-production-feed
=============================================================================
yum search wp-cli
cpanel-wp-cli.noarch : cpanel-wp-cli 2.1.0 for WordPress
wp-cli.noarch : wp-cli 1.5.1 for WordPress
what is the difference between wp-cli (not installed) and cpanel-wp-cli (installed by default). I can't seem to run or access wp-cli with cpanel-wp-cli. If I would install the other wp-cli, would that cause conflicts?
Thanks
-
Thanks I tried to use wp cli (the cpanel version) but could not get it work. I had to install the other wp-cli. Would there been a path issue? Also, does having both create any conflict? 0 -
I am having same issue. As WHM ran yum install wp-cli noticed it installed cpanel-wp-cli. Which from reading is correct, however I can't seem to use the wp command. And when I read other guides I try to locate the .phar file to add it to my /bin/bash but i can't seem to find the file. EDIT: I ended up figuring it out. First I checked where it was installed using the rpm command: rpm -ql cpanel-wp-cli Which output: /usr/local/cpanel/3rdparty/bin /usr/local/cpanel/3rdparty/bin/wp /usr/local/cpanel/3rdparty/share /usr/local/cpanel/3rdparty/share/cpanel-wp-cli /usr/local/cpanel/3rdparty/share/cpanel-wp-cli/wp-cli.phar ######################## I then tried: chmod +x wp-cli.phar Which gave error: chmod: cannot access "wp-cli.phar": No such file or directory ######################## So i moved to the directory using cd command: cd /usr/local/cpanel/3rdparty/share/cpanel-wp-cli Then I could run the commands: chmod +x wp-cli.phar sudo mv wp-cli.phar /usr/local/bin/wp ######################## Move back to main and check the command: cd wp 0 -
Good Investigation jdwf0658, however, since you moved it, I'm wondering if there are any native cPanel scripts/functions that would break that are calling the phar file (via php cpanel-wp-cli) directly from that location? 0 -
Good Investigation jdwf0658, however, since you moved it, I'm wondering if there are any native cPanel scripts/functions that would break that are calling the phar file (via php cpanel-wp-cli) directly from that location?
So far I haven't run into any issues. It worked fine for both root and user. One thing to note when running in cron, it'll throw up a php warning. There was active development about the issue which looks like they patched it 13 days ago, you can see it here:0 -
Thanks! 0 -
The package we provide is the most up to date package
I doubt. [CODE=bash]# /usr/local/cpanel/3rdparty/bin/wp cli version --allow-root WP-CLI 2.1.0
The latest wp cli version is 2.4.0 WP-CLI Release v2.4.0 I raised this issue last year, but my feature request to keep wp-cli up-to-date was closed by benny@cpanel.net WordPress" Manager Change Log | cPanel & WHM Documentation0
Please sign in to leave a comment.
Comments
7 comments