Skip to main content

cpanel-wp-cli

Comments

7 comments

  • cPanelLauren
    Hello, The package we provide is the most up to date package where the CentOS Base version is the version provided with the OS - which is the only difference - This is noted in one of our changelogs here:
    0
  • ca2236
    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
  • jdwf0658
    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
  • ca2236
    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
  • jdwf0658
    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
  • ca2236
    Thanks!
    0
  • PlotHost
    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 Documentation
    0

Please sign in to leave a comment.