Skip to content

Commit ad034c4

Browse files
authored
Merge pull request #565 from wp-cli/add/handbook-2.12
Update handbook after v2.12 release
2 parents f1555a5 + 2d36dc5 commit ad034c4

File tree

25 files changed

+312
-5
lines changed

25 files changed

+312
-5
lines changed

bin/commands-manifest.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2119,6 +2119,22 @@
21192119
"markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/transient\/list.md",
21202120
"repo_url": "https:\/\/github.com\/wp-cli\/cache-command"
21212121
},
2122+
"transient\/patch": {
2123+
"title": "transient patch",
2124+
"slug": "patch",
2125+
"cmd_path": "transient\/patch",
2126+
"parent": "transient",
2127+
"markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/transient\/patch.md",
2128+
"repo_url": "https:\/\/github.com\/wp-cli\/cache-command"
2129+
},
2130+
"transient\/pluck": {
2131+
"title": "transient pluck",
2132+
"slug": "pluck",
2133+
"cmd_path": "transient\/pluck",
2134+
"parent": "transient",
2135+
"markdown_source": "https:\/\/github.com\/wp-cli\/handbook\/blob\/main\/commands\/transient\/pluck.md",
2136+
"repo_url": "https:\/\/github.com\/wp-cli\/cache-command"
2137+
},
21222138
"transient\/set": {
21232139
"title": "transient set",
21242140
"slug": "set",

commands/cache/patch.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# wp cache patch
2+
3+
Update a nested value from the cache.
4+
5+
### OPTIONS
6+
7+
<action>
8+
: Patch action to perform.
9+
\---
10+
options:
11+
- insert
12+
- update
13+
- delete
14+
\---
15+
16+
<key>
17+
: Cache key.
18+
19+
<key-path>...
20+
: The name(s) of the keys within the value to locate the value to patch.
21+
22+
[<value>]
23+
: The new value. If omitted, the value is read from STDIN.
24+
25+
[\--group=<group>]
26+
: Method for grouping data within the cache which allows the same key to be used across groups.
27+
\---
28+
default: default
29+
\---
30+
31+
[\--expiration=<expiration>]
32+
: Define how long to keep the value, in seconds. `0` means as long as possible.
33+
---
34+
default: 0
35+
---
36+
37+
[\--format=<format>]
38+
: The serialization format for the value.
39+
\---
40+
default: plaintext
41+
options:
42+
- plaintext
43+
- json
44+
\---
45+
46+
### GLOBAL PARAMETERS
47+
48+
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.
49+
50+
| **Argument** | **Description** |
51+
|:----------------|:-----------------------------|
52+
| `--path=<path>` | Path to the WordPress files. |
53+
| `--url=<url>` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. |
54+
| `--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"). |
55+
| `--http=<http>` | Perform operation against a remote WordPress installation over HTTP. |
56+
| `--user=<id\|login\|email>` | Set the WordPress user. |
57+
| `--skip-plugins[=<plugins>]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. |
58+
| `--skip-themes[=<themes>]` | Skip loading all themes, or a comma-separated list of themes. |
59+
| `--skip-packages` | Skip loading all installed packages. |
60+
| `--require=<path>` | Load PHP file before running the command (may be used more than once). |
61+
| `--exec=<php-code>` | Execute PHP code before running the command (may be used more than once). |
62+
| `--context=<context>` | Load WordPress in a given context. |
63+
| `--[no-]color` | Whether to colorize the output. |
64+
| `--debug[=<group>]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. |
65+
| `--prompt[=<assoc>]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. |
66+
| `--quiet` | Suppress informational messages. |

commands/cache/pluck.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# wp cache pluck
2+
3+
Get a nested value from the cache.
4+
5+
### OPTIONS
6+
7+
&lt;key&gt;
8+
: Cache key.
9+
10+
&lt;key-path&gt;...
11+
: The name(s) of the keys within the value to locate the value to pluck.
12+
13+
[\--group=&lt;group&gt;]
14+
: Method for grouping data within the cache which allows the same key to be used across groups.
15+
\---
16+
default: default
17+
\---
18+
19+
[\--format=&lt;format&gt;]
20+
: The output format of the value.
21+
\---
22+
default: plaintext
23+
options:
24+
- plaintext
25+
- json
26+
- yaml
27+
\---
28+
29+
### GLOBAL PARAMETERS
30+
31+
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.
32+
33+
| **Argument** | **Description** |
34+
|:----------------|:-----------------------------|
35+
| `--path=<path>` | Path to the WordPress files. |
36+
| `--url=<url>` | Pretend request came from given URL. In multisite, this argument is how the target site is specified. |
37+
| `--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"). |
38+
| `--http=<http>` | Perform operation against a remote WordPress installation over HTTP. |
39+
| `--user=<id\|login\|email>` | Set the WordPress user. |
40+
| `--skip-plugins[=<plugins>]` | Skip loading all plugins, or a comma-separated list of plugins. Note: mu-plugins are still loaded. |
41+
| `--skip-themes[=<themes>]` | Skip loading all themes, or a comma-separated list of themes. |
42+
| `--skip-packages` | Skip loading all installed packages. |
43+
| `--require=<path>` | Load PHP file before running the command (may be used more than once). |
44+
| `--exec=<php-code>` | Execute PHP code before running the command (may be used more than once). |
45+
| `--context=<context>` | Load WordPress in a given context. |
46+
| `--[no-]color` | Whether to colorize the output. |
47+
| `--debug[=<group>]` | Show all PHP errors and add verbosity to WP-CLI output. Built-in groups include: bootstrap, commandfactory, and help. |
48+
| `--prompt[=<assoc>]` | Prompt the user to enter values for all command arguments, or a subset specified as comma-separated values. |
49+
| `--quiet` | Suppress informational messages. |

commands/cli/check-update.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Queries the GitHub releases API. Returns available versions if there are updates
2121
: Prints the value of a single field for each update.
2222

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

2626
[\--format=&lt;format&gt;]
2727
: Render output in a particular format.

commands/cli/update.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Only works for the Phar installation mechanism.
3939

4040
# Update CLI.
4141
$ wp cli update
42-
You have version 0.24.0. Would you like to update to 0.24.1? [y/n] y
42+
You are currently using WP-CLI version 0.24.0. Would you like to update to 0.24.1? [y/n] y
4343
Downloading from https://github.com/wp-cli/wp-cli/releases/download/v0.24.1/wp-cli-0.24.1.phar...
4444
New version works. Proceeding to replace.
4545
Success: Updated WP-CLI to 0.24.1.

commands/comment/meta/get.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ Get meta field value.
1010
&lt;key&gt;
1111
: The name of the meta field to get.
1212

13+
[\--single]
14+
: Whether to return a single value.
15+
1316
[\--format=&lt;format&gt;]
1417
: Get value in a particular format.
1518
\---

commands/core/is-installed.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ Determines whether WordPress is installed by checking if the standard database t
1313

1414
# Bash script for checking if WordPress is not installed.
1515

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

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

23-
if wp core is-installed 2&gt;/dev/null; then
23+
if wp core is-installed 2>/dev/null; then
2424
# WP is installed. Let's do some things we should only do in a confirmed WP environment.
2525
wp core verify-checksums
2626
else

commands/core/verify-checksums.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ If you experience issues verifying from this command, ensure you are passing the
2424
[\--insecure]
2525
: Retry downloads without certificate validation if TLS handshake fails. Note: This makes the request vulnerable to a MITM attack.
2626

27+
[\--exclude=&lt;files&gt;]
28+
: Exclude specific files from the checksum verification. Provide a comma-separated list of file paths.
29+
2730
### EXAMPLES
2831

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

51+
# Verify checksums and exclude files
52+
$ wp core verify-checksums --exclude="readme.html"
53+
Success: WordPress installation verifies against checksums.
54+
4855
### GLOBAL PARAMETERS
4956

5057
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.

commands/db/export.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ Runs `mysqldump` utility using `DB_HOST`, `DB_NAME`, `DB_USER` and `DB_PASSWORD`
3232
[\--porcelain]
3333
: Output filename for the exported database.
3434

35+
[\--add-drop-table]
36+
: Include a `DROP TABLE IF EXISTS` statement before each `CREATE TABLE` statement.
37+
3538
[\--defaults]
3639
: Loads the environment's MySQL option files. Default behavior is to skip loading them to avoid failures due to misconfiguration.
3740

commands/db/search.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,15 @@ default: 40
7070

7171
[\--format=&lt;format&gt;]
7272
: Render output in a particular format.
73+
\---
74+
options:
75+
- table
76+
- csv
77+
- json
78+
- yaml
79+
- ids
80+
- count
81+
\---
7382

7483
The percent color codes available are:
7584

@@ -105,6 +114,16 @@ The percent color codes available are:
105114

106115
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`.
107116

117+
### AVAILABLE FIELDS
118+
119+
These fields will be displayed by default for each result:
120+
121+
* table
122+
* column
123+
* match
124+
* primary_key_name
125+
* primary_key_value
126+
108127
### EXAMPLES
109128

110129
# Search through the database for the 'wordpress-develop' string

0 commit comments

Comments
 (0)