• My hosting provider (inMotionHosting) installed wp-cli for me today (since my user account doesn’t have the necessary permissions). When I go to my wp root (~/public_html) and run “wp –info” to ensure that it’s working, I get the expected output:

    [~/public_html]# wp --info
    PHP binary:     /usr/local/bin/php
    PHP version:    5.4.45
    php.ini used:   /usr/local/lib/php.ini
    WP-CLI root dir:        phar://wp-cli.phar
    WP-CLI global config:
    WP-CLI project config:
    WP-CLI version: 0.21.1

    When I run any other command (even wp help), however, it returns the html sourcecode of our WordPress home page.

    I suspect something went wrong in the installation, but the hosting provider seems more than a little clueless regarding wp-cli and I’m hoping to be able to tell them exactly what needs to be fixed.

    I’ve spent the last hour Googling and researching and haven’t found anybody else reporting this behavior.

    Ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    It sounds like wp-cli isn’t installed correctly. The current version is 0.22.0 and if you are runninh 4.4.2 of WordPress I think that might be part of the problem.

    $ wp --info
    PHP binary:	/usr/local/php7/bin/php
    PHP version:	7.0.1-dev
    php.ini used:
    WP-CLI root dir:	phar://wp-cli.phar
    WP-CLI global config:
    WP-CLI project config:
    WP-CLI version:	0.22.0
    $

    Try updating wp-cli to the latest version and see if that takes care of it.

    Thread Starter mgatten

    (@mgatten)

    Thank you. They updated it, which is good regardless, but the problem continued.

    Eventually I tracked it down to a problem with the WP Fastest Cache plugin. I created an alias in my .bash-profile file of “wp=wp –skip-plugin wp-fastest-cache”.

    And now it works. Thanks for your help – the upgrade was important regardless of if it fixed this particular issue.

    Marshall

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using wp-cli, running any command other than –info returns html of site page’ is closed to new replies.