Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions bin/commands-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2119,6 +2119,22 @@
"markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/transient\/list.md",
"repo_url": "https:\/\/github.com\/wp-cli\/cache-command"
},
"transient\/patch": {
"title": "transient patch",
"slug": "patch",
"cmd_path": "transient\/patch",
"parent": "transient",
"markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/transient\/patch.md",
"repo_url": "https:\/\/github.com\/wp-cli\/cache-command"
},
"transient\/pluck": {
"title": "transient pluck",
"slug": "pluck",
"cmd_path": "transient\/pluck",
"parent": "transient",
"markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/transient\/pluck.md",
"repo_url": "https:\/\/github.com\/wp-cli\/cache-command"
},
"transient\/set": {
"title": "transient set",
"slug": "set",
Expand Down
66 changes: 66 additions & 0 deletions commands/cache/patch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# wp cache patch

Update a nested value from the cache.

### OPTIONS

<action>
: Patch action to perform.
\---
options:
- insert
- update
- delete
\---

<key>
: Cache key.

<key-path>...
: The name(s) of the keys within the value to locate the value to patch.

[<value>]
: The new value. If omitted, the value is read from STDIN.

[\--group=<group>]
: Method for grouping data within the cache which allows the same key to be used across groups.
\---
default: default
\---

[\--expiration=<expiration>]
: Define how long to keep the value, in seconds. `0` means as long as possible.
---
default: 0
---

[\--format=<format>]
: The serialization format for the value.
\---
default: plaintext
options:
- plaintext
- json
\---

### GLOBAL PARAMETERS

These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress.

| **Argument** | **Description** |
|:----------------|:-----------------------------|
| `--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", "docker-compose-run", "vagrant"). |
| `--http=<http>` | Perform operation against a remote WordPress installation 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). |
| `--exec=<php-code>` | Execute PHP code before running the command (may be used more than once). |
| `--context=<context>` | Load WordPress in a given context. |
| `--[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. |
49 changes: 49 additions & 0 deletions commands/cache/pluck.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# wp cache pluck

Get a nested value from the cache.

### OPTIONS

&lt;key&gt;
: Cache key.

&lt;key-path&gt;...
: The name(s) of the keys within the value to locate the value to pluck.

[\--group=&lt;group&gt;]
: Method for grouping data within the cache which allows the same key to be used across groups.
\---
default: default
\---

[\--format=&lt;format&gt;]
: The output format of the value.
\---
default: plaintext
options:
- plaintext
- json
- yaml
\---

### GLOBAL PARAMETERS

These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress.

| **Argument** | **Description** |
|:----------------|:-----------------------------|
| `--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", "docker-compose-run", "vagrant"). |
| `--http=<http>` | Perform operation against a remote WordPress installation 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). |
| `--exec=<php-code>` | Execute PHP code before running the command (may be used more than once). |
| `--context=<context>` | Load WordPress in a given context. |
| `--[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. |
2 changes: 1 addition & 1 deletion commands/cli/check-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Queries the GitHub releases API. Returns available versions if there are updates
: Prints the value of a single field for each update.

[\--fields=&lt;fields&gt;]
: Limit the output to specific object fields. Defaults to version,update_type,package_url.
: Limit the output to specific object fields. Defaults to version,update_type,package_url,status,requires_php.

[\--format=&lt;format&gt;]
: Render output in a particular format.
Expand Down
2 changes: 1 addition & 1 deletion commands/cli/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Only works for the Phar installation mechanism.

# Update CLI.
$ wp cli update
You have version 0.24.0. Would you like to update to 0.24.1? [y/n] y
You are currently using WP-CLI version 0.24.0. Would you like to update to 0.24.1? [y/n] y
Downloading from https://github.com/wp-cli/wp-cli/releases/download/v0.24.1/wp-cli-0.24.1.phar...
New version works. Proceeding to replace.
Success: Updated WP-CLI to 0.24.1.
Expand Down
3 changes: 3 additions & 0 deletions commands/comment/meta/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Get meta field value.
&lt;key&gt;
: The name of the meta field to get.

[\--single]
: Whether to return a single value.

[\--format=&lt;format&gt;]
: Get value in a particular format.
\---
Expand Down
4 changes: 2 additions & 2 deletions commands/core/is-installed.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ Determines whether WordPress is installed by checking if the standard database t

# Bash script for checking if WordPress is not installed.

if ! wp core is-installed 2&gt;/dev/null; then
if ! wp core is-installed 2>/dev/null; then
# WP is not installed. Let's try installing it.
wp core install
fi

# Bash script for checking if WordPress is installed, with fallback.

if wp core is-installed 2&gt;/dev/null; then
if wp core is-installed 2>/dev/null; then
# WP is installed. Let's do some things we should only do in a confirmed WP environment.
wp core verify-checksums
else
Expand Down
7 changes: 7 additions & 0 deletions commands/core/verify-checksums.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ If you experience issues verifying from this command, ensure you are passing the
[\--insecure]
: Retry downloads without certificate validation if TLS handshake fails. Note: This makes the request vulnerable to a MITM attack.

[\--exclude=&lt;files&gt;]
: Exclude specific files from the checksum verification. Provide a comma-separated list of file paths.

### EXAMPLES

# Verify checksums
Expand All @@ -45,6 +48,10 @@ If you experience issues verifying from this command, ensure you are passing the
Warning: File doesn't verify against checksum: wp-config-sample.php
Error: WordPress installation doesn't verify against checksums.

# Verify checksums and exclude files
$ wp core verify-checksums --exclude="readme.html"
Success: WordPress installation verifies against checksums.

### GLOBAL PARAMETERS

These [global parameters](https://make.wordpress.org/cli/handbook/config/) have the same behavior across all commands and affect how WP-CLI interacts with WordPress.
Expand Down
3 changes: 3 additions & 0 deletions commands/db/export.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ Runs `mysqldump` utility using `DB_HOST`, `DB_NAME`, `DB_USER` and `DB_PASSWORD`
[\--porcelain]
: Output filename for the exported database.

[\--add-drop-table]
: Include a `DROP TABLE IF EXISTS` statement before each `CREATE TABLE` statement.

[\--defaults]
: Loads the environment's MySQL option files. Default behavior is to skip loading them to avoid failures due to misconfiguration.

Expand Down
19 changes: 19 additions & 0 deletions commands/db/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ default: 40

[\--format=&lt;format&gt;]
: Render output in a particular format.
\---
options:
- table
- csv
- json
- yaml
- ids
- count
\---

The percent color codes available are:

Expand Down Expand Up @@ -105,6 +114,16 @@ The percent color codes available are:

They can be concatenated. For instance, the default match color of black on a mustard (dark yellow) background `%3%k` can be made black on a bright yellow background with `%Y%0%8`.

### AVAILABLE FIELDS

These fields will be displayed by default for each result:

* table
* column
* match
* primary_key_name
* primary_key_value

### EXAMPLES

# Search through the database for the 'wordpress-develop' string
Expand Down
3 changes: 3 additions & 0 deletions commands/dist-archive.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ Use one distribution archive command for many projects, instead of a bash script
[\--create-target-dir]
: Automatically create the target directory as needed.

[\--force]
: Forces overwriting of the archive file if it already exists.

[\--plugin-dirname=&lt;plugin-slug&gt;]
: Set the archive extract directory name. Defaults to project directory name.

Expand Down
6 changes: 6 additions & 0 deletions commands/i18n/make-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ See https://make.wordpress.org/core/2018/11/09/new-javascript-i18n-support-in-wo
[&lt;destination&gt;]
: Path to the destination directory for the resulting JSON files. Defaults to the source directory.

[\--domain=&lt;domain&gt;]
: Text domain to use for the JSON file name. Overrides the default one extracted from the PO file.

[\--extensions=&lt;extensions&gt;]
: Additional custom JS extensions, comma separated list. By default searches for .min.js and .js extensions.

[\--purge]
: Whether to purge the strings that were extracted from the original source file. Defaults to true, use `--no-purge` to skip the removal.

Expand Down
3 changes: 3 additions & 0 deletions commands/network/meta/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Get meta field value.
&lt;key&gt;
: The name of the meta field to get.

[\--single]
: Whether to return a single value.

[\--format=&lt;format&gt;]
: Get value in a particular format.
\---
Expand Down
3 changes: 3 additions & 0 deletions commands/plugin/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ Installs one or more plugins.
[\--force]
: If set, the command will overwrite any installed version of the plugin, without prompting for confirmation.

[\--ignore-requirements]
:If set, the command will install the plugin while ignoring any WordPress or PHP version requirements specified by the plugin authors.

[\--activate]
: If set, the plugin will be activated immediately after install.

Expand Down
2 changes: 2 additions & 0 deletions commands/plugin/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ These fields are optionally available:
* file
* author
* tested_up_to
* requires
* requires_php
* wporg_status
* wporg_last_updated

Expand Down
3 changes: 3 additions & 0 deletions commands/post/meta/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Get meta field value.
&lt;key&gt;
: The name of the meta field to get.

[\--single]
: Whether to return a single value.

[\--format=&lt;format&gt;]
: Get value in a particular format.
\---
Expand Down
2 changes: 1 addition & 1 deletion commands/role/delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Deletes an existing role.
Success: Role with key 'approver' deleted.

# Delete productadmin role.
wp role delete productadmin
$ wp role delete productadmin
Success: Role with key 'productadmin' deleted.

### GLOBAL PARAMETERS
Expand Down
1 change: 1 addition & 0 deletions commands/scaffold/plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ default: circle
options:
- circle
- gitlab
- bitbucket
- github
\---

Expand Down
3 changes: 3 additions & 0 deletions commands/site/meta/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Get meta field value.
&lt;key&gt;
: The name of the meta field to get.

[\--single]
: Whether to return a single value.

[\--format=&lt;format&gt;]
: Get value in a particular format.
\---
Expand Down
3 changes: 3 additions & 0 deletions commands/term/meta/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Get meta field value.
&lt;key&gt;
: The name of the meta field to get.

[\--single]
: Whether to return a single value.

[\--format=&lt;format&gt;]
: Get value in a particular format.
\---
Expand Down
3 changes: 3 additions & 0 deletions commands/theme/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ Installs one or more themes.
[\--force]
: If set, the command will overwrite any installed version of the theme, without prompting for confirmation.

[\--ignore-requirements]
: If set, the command will install the theme while ignoring any WordPress or PHP version requirements specified by the theme authors.

[\--activate]
: If set, the theme will be activated immediately after install.

Expand Down
Loading