wp package install
Packages are required to be a valid Composer package, and can be specified as:
- Package name from WP-CLI’s package index.
- Git URL accessible by the current shell user.
- Path to a directory on the local machine.
- Local or remote .zip file.
Packages are installed to
~/.wp-cli/packages/ by default. Use the
WP_CLI_PACKAGES_DIR environment variable to provide a custom path.
When installing a local directory, WP-CLI simply registers a reference to the directory. If you move or delete the directory, WP-CLI’s reference breaks.
When installing a .zip file, WP-CLI extracts the package to
- Name, git URL, directory path, or .zip file for the package to install. Names can optionally include a version constraint (e.g. wp-cli/server-command:@stable).
# Install the latest development version from the package index. $ wp package install wp-cli/server-command Installing package wp-cli/server-command (dev-master) Updating /home/person/.wp-cli/packages/composer.json to require the package... Using Composer to install the package... --- Loading composer repositories with package information Updating dependencies Resolving dependencies through SAT Dependency resolution completed in 0.005 seconds Analyzed 732 packages to resolve dependencies Analyzed 1034 rules to resolve dependencies - Installing package Writing lock file Generating autoload files --- Success: Package installed. # Install the latest stable version. $ wp package install wp-cli/server-command:@stable # Install a package hosted at a git URL. $ wp package install email@example.com:runcommand/hook.git # Install a package in a .zip file. $ wp package install google-sitemap-generator-cli.zip
GLOBAL PARAMETERS GLOBAL PARAMETERS
These global parameters have the same behavior across all commands and affect how WP-CLI interacts with WordPress.
||Path to the WordPress files.|
||Pretend request came from given URL. In multisite, this argument is how the target site is specified.|
||Perform operation against a remote server over SSH (or a container using scheme of “docker”, “docker-compose”, “vagrant”).|
||Perform operation against a remote WordPress installation over HTTP.|
||Set the WordPress user.|
||Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded.|
||Skip loading all themes, or a comma-separated list of themes.|
||Skip loading all installed packages.|
||Load PHP file before running the command (may be used more than once).|
||Whether to colorize the output.|
||Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help.|
||Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values.|
||Suppress informational messages.|