Wordpress Toolkit Command Line Interface

dstana

Well-Known Member
Jul 6, 2016
117
20
68
Phoenix, AZ
cPanel Access Level
Root Administrator
From the docs I'm seeing an option for wp-toolkit to be used on the command line. WordPress Toolkit Command Line Interface | cPanel & WHM Documentation

When I try running the wp-toolkit command from the shell I get nothing. Any ideas what the issue is? Would like to take advantage of disabling wp-cron system wide through a bash script and maybe try pushing some updates that way. CLI access would be really useful but doesn't seem to work.

--A side issue I've also noticed is WP-Toolkit has an option to reinstall the WordPress core but fails every time. Error messages mention index.php and extracting the files.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,597
2,616
363
cPanel Access Level
Root Administrator
Hey there! Can you be more specific by what you mean when you say you "get nothing" from the command? Is the command not present on the system, or does it not provide any output? Once I know that I can try and get you better details on the issue.
 

dstana

Well-Known Member
Jul 6, 2016
117
20
68
Phoenix, AZ
cPanel Access Level
Root Administrator
Hey there! Can you be more specific by what you mean when you say you "get nothing" from the command? Is the command not present on the system, or does it not provide any output? Once I know that I can try and get you better details on the issue.
Correct, the command is not present.

Code:
bash: wp-toolkit: command not found
 

dstana

Well-Known Member
Jul 6, 2016
117
20
68
Phoenix, AZ
cPanel Access Level
Root Administrator
Interesting - I would expect those to just be present once the main WordPress Toolkit package is installed.

Can you try reinstalling the wp-toolkit-cpanel RPM to see if that gets things working?
Removed and re-installed, no change. Also worth noting I have several servers in more or less the same configuration and it doesn't work on any of them.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,597
2,616
363
cPanel Access Level
Root Administrator
Alright, let's start from the top and see what's missing.

Can you send the output of this?

Code:
# rpm -qa | grep wp-toolkit
wp-toolkit-cpanel-5.6.2-2854.x86_64
Can you also let me know the operating system you're using and cPanel version?

Can you confirm you are performing this work as the root user and not a reseller of cPanel user?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,597
2,616
363
cPanel Access Level
Root Administrator
Here is what I see for the root user on my personal server:

Code:
# echo $PATH
/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/cpanel/composer/bin:/root/bin
and the link should be the following:

Code:
lrwxrwxrwx.  1 root root   52 Sep 15 02:52 wp-toolkit -> /usr/local/cpanel/3rdparty/wp-toolkit/bin/wpt-cli.sh
Can you check those out and recreate the link if necessary to see if that gets things working normally?
 

dstana

Well-Known Member
Jul 6, 2016
117
20
68
Phoenix, AZ
cPanel Access Level
Root Administrator
Here is what I see for the root user on my personal server:

Code:
# echo $PATH
/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/cpanel/composer/bin:/root/bin
and the link should be the following:

Code:
lrwxrwxrwx.  1 root root   52 Sep 15 02:52 wp-toolkit -> /usr/local/cpanel/3rdparty/wp-toolkit/bin/wpt-cli.sh
Can you check those out and recreate the link if necessary to see if that gets things working normally?
The link is good, I'm missing some of that in my path

Code:
# echo $PATH
/usr/local/cpanel/3rdparty/lib/path-bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/cpanel/composer/bin