0

Please review the following commands I have issued remotely to the Bash Shell on my dedicated cPanel/WHM server:

[root@host ~]# wp cli update Success: WP-CLI is at the latest version.

Then I switched to a cPanel account (with shell access) that hosts a WordPress site:

[root@host ~]# su -l chaseland Last login: Fri Oct 30 15:17:01 MDT 2020 on pts/0

…and the --info command does indeed work:

[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/vendor WP_CLI phar path: /home/chaseland WP-CLI packages dir:
WP-CLI global config: WP-CLI project config:
WP-CLI version: 2.4.0

However, any other command I try to execute produces an error:

[chaseland@host ~]$ wp plugin update --all Error: This does not seem to be a WordPress installation. Pass --path=path/to/wordpress or run wp core download. [chaseland@host ~]$

This is my first installation of WP CLI and am having difficulty determining what to do next.

Thank you for any assistance, Don

  • 1
    So from what folder exactly did you execute the commands? You need to execute them from within a Wordpress installation. Otherwise specify its location with --path. Anything special to you WordPress installation? – leymannx Oct 31 at 6:25
  • You need to find the folder with wp-config.php in it. Where this is will depend on how your host is set up: it may be in a public_html file in your home directory if this is a shared-hosting setup, or it might be under /var/www/html or similar if you have your own VM or VPC, or even /usr/share/wordpress on some systems. – Rup Oct 31 at 12:26
  • If you're not sure where to look I'd ask your host. Alternatively if you can probably find a reference to the path in your webserver configuration which is probably under /etc/httpd or /etc/nginx. – Rup Oct 31 at 12:27
  • I don't see how to post a reply, so I simply added a comment. The command was issued from the home directory where the wp-config.php file is located, which is how I set up all my WP installations. This is a dedicated server with CentOS 7 as the operating system. I am the host. – Don Oct 31 at 21:39
  • Hi... this is Don again. I was under the impression I could install WP CLI as the root user and use it on all cPanel accounts on my dedicated device by using the switch user (su) command before executing WP CLI commands. The reason I had this idea is due to the fact wp-cli is offered as an RPM in my WHM control panel; however, now I'm wondering if I need to install wp-cli under each cPanel account hosting WordPress. Thanks, Don – Don Nov 1 at 20:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.