Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: 'package' is not a registered wp command. See 'wp help' for available commands. #4900

Closed
bondansebastian opened this Issue Aug 9, 2018 · 5 comments

Comments

5 participants
@bondansebastian
Copy link

bondansebastian commented Aug 9, 2018

Hi, i just tried wp-cli and curently experiencing problem trying to use this cool tool.

I installed wp-cli via composer using composer global require wp-cli/wp-cli command.
Currently only 3 commands available for me:

SUBCOMMANDS

  cli       Review current WP-CLI info, check for updates, or see defined aliases.
  help      Get help on WP-CLI, or on a specific command.
  ocdi

When i tried to install a package, the command line says

Error: 'package' is not a registered wp command. See 'wp help' for available commands.

I am on windows machine, using MINGW64 as terminal.
Strange thing is, calling wp on window's cmd or powershell results in

'sh' is not recognized as an internal or external command, operable program or batch file.

I have enabled linux subsystem for windows though.

Here's the output of wp --info

OS:     Windows NT 10.0 build 17134 (Windows 10) i586
Shell:  C:\WINDOWS\system32\cmd.exe
PHP binary:     C:/xampp/php/php
PHP version:    7.1.15
php.ini used:   C:\xampp\php\php.ini
WP-CLI root dir:        C:\Users\Bondan\AppData\Roaming\Composer\vendor\wp-cli\wp-cli
WP-CLI vendor dir:      C:\Users\Bondan\AppData\Roaming\Composer\vendor
WP_CLI phar path:
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.0.0

As can be seen above, my WP-CLI packages dir is always empy, even though i called wp command from my local wordpress installation folder.

And here's the complete output of wp help, which always the same no matter from which folder i run the command.

NAME

  wp

DESCRIPTION

  Manage WordPress through the command-line.

SYNOPSIS

  wp <command>

SUBCOMMANDS

  cli       Review current WP-CLI info, check for updates, or see defined aliases.
  help      Get help on WP-CLI, or on a specific command.
  ocdi



GLOBAL PARAMETERS

  --path=<path>
      Path to the WordPress files.

  --url=<url>
      Pretend request came from given URL. In multisite, this argument is how the target site is specified.

  --ssh=[<scheme>:][<user>@]<host|container>[:<port>][<path>]
      Perform operation against a remote server over SSH (or a container using scheme of "docker", "docker-compose", "vagrant").

  --http=<http>
      Perform operation against a remote WordPress install over HTTP.

  --user=<id|login|email>
      Set the WordPress user.

  --skip-plugins[=<plugins>]
      Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded.

  --skip-themes[=<themes>]
      Skip loading all themes, or a comma-separated list of themes.

  --skip-packages
      Skip loading all installed packages.

  --require=<path>
      Load PHP file before running the command (may be used more than once).

  --[no-]color
      Whether to colorize the output.

  --debug[=<group>]
      Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help.

  --prompt[=<assoc>]
      Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values.

  --quiet
      Suppress informational messages.

  Run 'wp help <command>' to get more information on a specific command.
@wojsmol

This comment has been minimized.

Copy link
Contributor

wojsmol commented Aug 9, 2018

Hi
Please see WP-CLI r2.0 release blog post, for normal use with all commands remove wp-cli/wp-cli and require wp-cli/wp-cli-bundle

@bondansebastian

This comment has been minimized.

Copy link
Author

bondansebastian commented Aug 9, 2018

Thanks for pointing out @wojsmol !

@schlessera

This comment has been minimized.

Copy link
Member

schlessera commented Aug 9, 2018

Yes, requiring wp-cli/wp-cli-bundle will pull in all the bundled command. wp-cli/wp-cli is the pure framework only now.

@schlessera schlessera closed this Aug 9, 2018

ronilaukkarinen added a commit to digitoimistodude/dudestack that referenced this issue Aug 9, 2018

@coreyworrell

This comment has been minimized.

Copy link
Contributor

coreyworrell commented Sep 19, 2018

@truongwp

This comment has been minimized.

Copy link

truongwp commented Oct 3, 2018

Thanks @wojsmol,

It solves my problem as well. The WordPress handbook should be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.