Only the wp --info command runs under my cPanel account(s)

Don Lange

Member
Jan 25, 2018
6
1
3
Murrieta, CA
cPanel Access Level
Root Administrator
Hello there...

I have WP CLI installed under /usr/local/bin:

-rwxr-xr-x 1 root root 5568133 Oct 18 01:02 wp
[[email protected] bin]# pwd
/usr/local/bin
[[email protected] bin]#

However, when I switch to a cPanel account that I want to use with WP CLI:

[[email protected]t bin]# su -l chaseland
Last login: Sun Nov 1 12:46:55 MST 2020 on pts/0
[[email protected] ~]$

The only command that runs is wp --info:

[[email protected] ~]$ 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
[[email protected] ~]$

...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:

[[email protected] ~]$ wp plugin list
Error: This does not seem to be a WordPress installation.
Pass --path=`path/to/wordpress` or run `wp core download`.
[[email protected] ~]$

I have wp-config.php installed in the home directory of the cPanel account hosting WordPress:

[[email protected] ~]$ 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
[[email protected] ~]$

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 Home » Software » Install an RPM and moved it to /usr/local/bin/wp afterwards.

Thanks again,
Don
 

cPSamuelM

Technical Analyst Team Lead
Staff member
Nov 20, 2019
196
37
103
USA
cPanel Access Level
Root Administrator
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:

Code:
[[email protected] ~]$ /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`.

[[email protected] ~]$ cd public_html/wordpress/
[[email protected] 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!
 

Don Lange

Member
Jan 25, 2018
6
1
3
Murrieta, CA
cPanel Access Level
Root Administrator
Hi,

I ran wp plugin list from /public_html:

[[email protected] ~]$ cd public_html
[[email protected] public_html]$ wp plugin list
[[email protected] public_html]$

and from /wp-content/plugins with the same empty results:

[[email protected] public_html]$ cd wp-content/plugins
[[email protected] plugins]$ wp plugin list
[[email protected] plugins]$

Here's my actual plugin listing:

[[email protected] 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-smu****
[[email protected] plugins]$

Thank you,
Don
 
Last edited: