WordPress как на ладони
Мощный и не дорогой хостинг от Fornex.com Хостинг, VPS/VDS и отдельные сервера только на SSD дисках. 7 дней бесплатного тестирования.

wp package

Перечисляет, устанавливает и удаляет пакеты WP-CLI.

WP-CLI packages are community-maintained projects built on WP-CLI. They can contain WP-CLI commands, but they can also just extend WP-CLI in some way.

Installable packages are listed in the Package Index.

Learn how to create your own command from the Commands Cookbook.

Список команд Описание
Просматривает доступные для установки пакеты WP-CLI.
Устанавливает пакет WP-CLI.
Список установленных пакетов WP-CLI.
Возвращает путь к установленному пакету WP-CLI или каталогу пакета.
Обновляет все установленные пакеты WP-CLI до их последней версии.
Удаляет пакет WP-CLI.

Примеры

# List installed packages
$ wp package list
+-----------------------+------------------------------------------+---------+------------+
| name                  | description                              | authors | version    |
+-----------------------+------------------------------------------+---------+------------+
| wp-cli/server-command | Start a development server for WordPress |         | dev-master |
+-----------------------+------------------------------------------+---------+------------+

# Install the latest development version of the package
$ 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.

# Uninstall package
$ wp package uninstall wp-cli/server-command
Removing require statement from /home/person/.wp-cli/packages/composer.json
Deleting package directory /home/person/.wp-cli/packages/vendor/wp-cli/server-command
Regenerating Composer autoload.
Success: Uninstalled package.

Исходный код команд


меню

wp package browse

Просматривает доступные для установки пакеты WP-CLI.

Lists packages available for installation from the Package Index. Although the package index will remain in place for backward compatibility reasons, it has been deprecated and will not be updated further. Please refer to https://github.com/wp-cli/ideas/issues/51 to read about its potential replacement.

Использование

wp package browse [--fields={fields}] [--format={format}]

Можно указать Глобальные параметры и следующие:

[--fields={fields}]
Limit the output to specific fields. Defaults to all fields.
[--format={format}]

Render output in a particular format.
По умолчанию: table
Может быть:

  • table
  • csv
  • ids
  • json
  • yaml

Доступные поля

These fields will be displayed by default for each package:

  • name
  • description
  • authors
  • version

There are no optionally available fields.

Примеры

$ wp package browse --format=yaml
---
10up/mu-migration:
  name: 10up/mu-migration
  description: A set of WP-CLI commands to support the migration of single WordPress instances to multisite
  authors: Nícholas André
  version: dev-master, dev-develop
aaemnnosttv/wp-cli-dotenv-command:
  name: aaemnnosttv/wp-cli-dotenv-command
  description: Dotenv commands for WP-CLI
  authors: Evan Mattson
  version: v0.1, v0.1-beta.1, v0.2, dev-master, dev-dev, dev-develop, dev-tests/behat
aaemnnosttv/wp-cli-http-command:
  name: aaemnnosttv/wp-cli-http-command
  description: WP-CLI command for using the WordPress HTTP API
  authors: Evan Mattson
  version: dev-master
меню

wp package install

Устанавливает пакет WP-CLI.

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 ~/.wp-cli/packages/local/<package-name>.

Использование

wp package install {name|git|path|zip}

Можно указать Глобальные параметры и следующие:

{name|git|path|zip}
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 git@github.com:runcommand/hook.git
# Install a package in a .zip file.
$ wp package install google-sitemap-generator-cli.zip
меню

wp package list

Список установленных пакетов WP-CLI.

Использование

wp package list [--fields={fields}] [--format={format}]

Можно указать Глобальные параметры и следующие:

[--fields={fields}]
Limit the output to specific fields. Defaults to all fields.
[--format={format}]

Render output in a particular format.
По умолчанию: table
Может быть:

  • table
  • csv
  • ids
  • json
  • yaml

Доступные поля

These fields will be displayed by default for each package:

  • name
  • authors
  • version
  • update
  • update_version

These fields are optionally available:

  • description

Примеры

$ wp package list
+-----------------------+------------------------------------------+---------+------------+
| name                  | description                              | authors | version    |
+-----------------------+------------------------------------------+---------+------------+
| wp-cli/server-command | Start a development server for WordPress |         | dev-master |
+-----------------------+------------------------------------------+---------+------------+
меню

wp package path

Возвращает путь к установленному пакету WP-CLI или каталогу пакета.

If you want to contribute to a package, this is a great way to jump to it.

Использование

wp package path [{name}]

Можно указать Глобальные параметры и следующие:

[{name}]
Name of the package to get the directory for.

Примеры

# Get package path
$ wp package path
/home/person/.wp-cli/packages/
# Change directory to package path
$ cd $(wp package path) && pwd
/home/vagrant/.wp-cli/packages

wp package update

Обновляет все установленные пакеты WP-CLI до их последней версии.

Использование

wp package update 

Примеры

$ wp package update
Using Composer to update packages...

	Loading composer repositories with package information
	Updating dependencies
	Resolving dependencies through SAT
	Dependency resolution completed in 0.074 seconds
	Analyzed 1062 packages to resolve dependencies
	Analyzed 22383 rules to resolve dependencies
	Writing lock file
	Generating autoload files
Success: Packages updated.

wp package uninstall

Удаляет пакет WP-CLI.

Использование

wp package uninstall {name}

Можно указать Глобальные параметры и следующие:

{name}
Name of the package to uninstall.

Примеры

$ wp package uninstall wp-cli/server-command
Removing require statement from /home/person/.wp-cli/packages/composer.json
Deleting package directory /home/person/.wp-cli/packages/vendor/wp-cli/server-command
Regenerating Composer autoload.
Success: Uninstalled package.
Комментариев нет
    Здравствуйте, !     Войти . Зарегистрироваться