@@ -6,36 +6,52 @@ display_global_parameters: true
66
77<small >[ Commands] ( /commands/ ) » ; [ cli] ( /commands/cli/ ) » ; update</small >
88
9- ` wp cli update ` - Fetch most recent update matching the requirements. Returns the available versions if there are updates, or empty if no update available .
9+ ` wp cli update ` - Update WP-CLI .
1010
1111<small >Quick links: <a href =" https://github.com/wp-cli/wp-cli/issues?q=is%3Aopen+label%3Acommand%3Acli-update+sort%3Aupdated-desc " >Github issues</a ></small >
1212
1313<hr />
1414
15+ Default behavior is to check the releases API for a newer version, and
16+ prompt if one is available.
17+
18+ Use ` --stable ` to install or reinstall the latest stable version.
19+
20+ Use ` --nightly ` to install the latest built version of the master branch.
21+ While not recommended for production, nightly contains the latest and
22+ greatest, and should be stable enough for development and staging
23+ environments.
24+
25+ Only works for the Phar installation mechanism.
26+
1527### OPTIONS
1628
1729[ \- -patch]
18- : Only perform patch updates
30+ : Only perform patch updates.
1931
2032[ \- -minor]
21- : Only perform minor updates
33+ : Only perform minor updates.
2234
2335[ \- -major]
24- : Only perform major updates
36+ : Only perform major updates.
37+
38+ [ \- -stable]
39+ : Update to the latest stable release. Skips update check.
2540
2641[ \- -nightly]
2742: Update to the latest built version of the master branch. Potentially unstable.
2843
2944[ \- -yes]
30- : Do not prompt for confirmation
45+ : Do not prompt for confirmation.
3146
3247### EXAMPLES
3348
49+ # Update CLI.
3450 $ wp cli update
35- You have version 0.23 .0. Would you like to update to 0.23 .1? [y/n] y
36- Downloading from https://github.com/wp-cli/wp-cli/releases/download/v0.23 .1/wp-cli-0.23 .1.phar...
51+ You have version 0.24 .0. Would you like to update to 0.24 .1? [y/n] y
52+ Downloading from https://github.com/wp-cli/wp-cli/releases/download/v0.24 .1/wp-cli-0.24 .1.phar...
3753 New version works. Proceeding to replace.
38- Success: Updated WP-CLI to 0.23.1
54+ Success: Updated WP-CLI to 0.24.1.
3955
4056
4157
0 commit comments