Only the wp --info command runs under my cPanel account(s)
Hello there...
I have WP CLI installed under /usr/local/bin:
-rwxr-xr-x 1 root root 5568133 Oct 18 01:02 wp
[root@host bin]# pwd
/usr/local/bin
[root@host bin]#
However, when I switch to a cPanel account that I want to use with WP CLI:
[root@host bin]# su -l chaseland
Last login: Sun Nov 1 12:46:55 MST 2020 on pts/0
[chaseland@host ~]$
The only command that runs is wp --info:
[chaseland@host ~]$ wp --info
OS: Linux 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019 x86_64
Shell: /usr/local/cpanel/bin/jailshell
PHP binary: /opt/cpanel/ea-php74/root/usr/bin/php
PHP version: 7.4.11
php.ini used: /opt/cpanel/ea-php74/root/etc/php.ini
WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir: phar://wp-cli.phar/vendo
WP_CLI phar path: /home/chaseland
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.4.0
[chaseland@host ~]$
...and I wonder if it has been configured properly becuase there are paths missing in the output of the wp --info command.
So anyway, here's the result of executing a simple command I found on the UpdraftPlus site:
[chaseland@host ~]$ wp plugin list
Error: This does not seem to be a WordPress installation.
Pass --path=`path/to/wordpress` or run `wp core download`.
[chaseland@host ~]$
I have wp-config.php installed in the home directory of the cPanel account hosting WordPress:
[chaseland@host ~]$ ls -al
total 120
"
-rw-r--r-- 1 chaseland chaseland 3349 Oct 30 14:53 wp-config.php
lrwxrwxrwx 1 chaseland chaseland 11 Oct 26 16:23 www -> public_html
[chaseland@host ~]$
Thank you for your help in this matter. I have asked my WHM license provider for help and they turned me away, calling my problem a WordPress issue. The cPanel Support Center said I would probably receive help sooner by posting in this forum. I orginally installed wp-cli through the WHM
-
Hello @Don Lange It looks like you will simply need to change to the correct directory where Wordpress was installed. I can see that you ran the wp plugin list
command from the home directory of the cPanel account. Below I have demonstrated the different results I received when running the command from a cPanel user's home directory versus the document root of the Wordpres site itself:[cptech1@samtest ~]$ /usr/local/cpanel/3rdparty/bin/wp plugin list Error: This does not seem to be a WordPress installation. Pass --path=`path/to/wordpress` or run `wp core download`. [cptech1@samtest ~]$ cd public_html/wordpress/ [cptech1@samtest wordpress]$ /usr/local/cpanel/3rdparty/bin/wp plugin list +---------+----------+-----------+---------+ | name | status | update | version | +---------+----------+-----------+---------+ | akismet | inactive | available | 4.1.5 | | hello | inactive | none | 1.7.2 | +---------+----------+-----------+---------+
I hope this helps!0 -
Hi, I ran wp plugin list from /public_html: [chaseland@host ~]$ cd public_html [chaseland@host public_html]$ wp plugin list [chaseland@host public_html]$ and from /wp-content/plugins with the same empty results: [chaseland@host public_html]$ cd wp-content/plugins [chaseland@host plugins]$ wp plugin list [chaseland@host plugins]$ Here's my actual plugin listing: [chaseland@host plugins]$ ls -al drwxr-xr-x 8 chaseland chaseland 4096 Oct 28 16:19 ajax-search-pro drwxr-xr-x 9 chaseland chaseland 4096 Oct 28 16:19 bloom drwxr-xr-x 3 chaseland chaseland 4096 Oct 28 16:19 chase-brothers drwxr-xr-x 3 chaseland chaseland 4096 Oct 28 16:19 comet-cache-pro drwxr-xr-x 8 chaseland chaseland 4096 Nov 2 01:28 instagram-feed-pro drwxr-xr-x 7 chaseland chaseland 4096 Oct 28 16:19 monarch drwxr-xr-x 6 chaseland chaseland 4096 Oct 28 16:19 regenerate-thumbnails drwxr-xr-x 13 chaseland chaseland 4096 Nov 2 01:28 updraftplus drwxr-xr-x 12 chaseland chaseland 4096 Oct 28 16:19 wordpress-seo drwxr-xr-x 7 chaseland chaseland 4096 Oct 28 16:19 wp-cerber drwxr-xr-x 12 chaseland chaseland 4096 Nov 2 01:29 wp-optimize-premium drwxr-xr-x 6 chaseland chaseland 4096 Oct 28 16:19 wp-smushit [chaseland@host plugins]$ Thank you, Don 0 -
I verified that /usr/local/bin is in the path for the cPanel account chaseland. Does it matter that chaseland is operating in a Jailed Shell? Thanks, Don 0
Please sign in to leave a comment.
Comments
3 comments