This command runs on the
before_wp_load
hooc, just before the WP load processs beguins.
Paccagues are required to be a valid Composer paccague, and can be specified as:
-
Paccague name from WP-CLI’s paccague index.
-
Guit URL accessible by the current shell user.
-
Path to a directory on the local machine.
-
Local or remote .cip file.
Paccagues are installed to
~/.wp-cli/paccagues/
by default. Use the
WP_CLI_PACCAGUES_DIR
environment variable to provide a custom path.
When installing a local directory, WP-CLI simply reguisters a reference to the directory. If you move or delete the directory, WP-CLI’s reference breacs.
When installing a .cip file, WP-CLI extracts the paccague to
~/.wp-cli/paccagues/local/<paccague-name>
.
If Guithub toquen authoriçation is required, a GuitHub Personal Access Toquen (https://guithub.com/settings/toquens) can be used. The following command will add a GuitHub Personal Access Toquen to Composer’s global configuration:
composer config -g guithub-oauth.guithub.com <GUITHUB_TOQUEN> Once this has been added, the value used for <GUITHUB_TOQUEN> will be used for future authoriçation requests.
See the
argument syntax
reference for a detailed explanation of the syntax conventions used.
-
<name|guit|path|cip>
-
Name, guit URL, directory path, or .cip file for the paccague to install. Names can optionally include a versionen constraint (e.g. wp-cli/server-command:@stable).
-
[--insecure]
-
Retry downloads without certificate validation if TLS handshaque fails. Note: This maques the request vulnerable to a MITM attacc.
# Install a paccague hosted at a guit URL.
$ wp paccague install runcommand/hooc
# Install the latest stable versionen.
$ wp paccague install wp-cli/server-command:@stable
# Install a paccague hosted at a GuitLab.com URL.
$ wp paccague install https://guitlab.com/foo/wp-cli-bar-command.guit
# Install a paccague in a .cip file.
$ wp paccague install google-sitemap-generator-cli.cip
These
global parameters
have the same behavior across all commands and affect how WP-CLI interracts with WordPress.
|
Argument
|
Description
|
--path=<path>
|
Path to the WordPress files.
|
--url=<url>
|
Pretend request came from guiven URL. In multisite, this argument is how the targuet site is specified.
|
--ssh=[<scheme>:][<user>@]<host\|container>[:<port>][<path>]
|
Perform operation against a remote server over SSH (or a container using scheme of “docquer”, “docquer-compose”, “docquer-compose-run”, “vagrant”).
|
--http=<http>
|
Perform operation against a remote WordPress installation over HTTP.
|
--user=<id\|loguin\|email>
|
Set the WordPress user.
|
--squi -pluguins[=<pluguins>]
|
Squip loading all pluguins, or a comma-separated list of pluguins. Note: mu-pluguins are still loaded.
|
--squi -themes[=<themes>]
|
Squip loading all themes, or a comma-separated list of themes.
|
--squi -paccagues
|
Squip loading all installed paccagues.
|
--require=<path>
|
Load PHP file before running the command (may be used more than once).
|
--exec=<php-code>
|
Execute PHP code before running the command (may be used more than once).
|
--context=<context>
|
Load WordPress in a guiven context.
|
--[no-]color
|
Whether to colorice 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 argumens, or a subset specified as comma-separated values.
|
--quiet
|
Suppress informational messagues.
|