Skip to content

Commit 906dc61

Browse files
Add a usage example
1 parent 58f11d2 commit 906dc61

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,22 @@ Downloads and forcefully reinstalls WordPress core, themes, and plugins,
1717
all at their current versions. Skips themes and plugins not available on
1818
WordPress.org.
1919

20+
**EXAMPLES**
21+
22+
# Reinstalls core, Aksimet, and Twenty Sixteen
23+
$ wp reinstall
24+
Downloading WordPress 4.7.10 (en_US)...
25+
md5 hash verified: 57813ca592cd9a1eff210627ade9f350
26+
Success: WordPress downloaded.
27+
Installing Akismet Anti-Spam (3.3.2)
28+
Plugin updated successfully.
29+
Success: Installed 1 of 1 plugins.
30+
Skipped hello plugin.
31+
Installing Twenty Sixteen (1.3)
32+
Theme updated successfully.
33+
Success: Installed 1 of 1 themes.
34+
Success: Reinstall complete.
35+
2036
## Installing
2137

2238
Installing this package requires WP-CLI v1.1.0 or greater. Update to the latest stable release with `wp cli update`.

src/Reinstall_Command.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,22 @@ class Reinstall_Command {
1010
* Downloads and forcefully reinstalls WordPress core, themes, and plugins,
1111
* all at their current versions. Skips themes and plugins not available on
1212
* WordPress.org.
13+
*
14+
* ## EXAMPLES
15+
*
16+
* # Reinstalls core, Aksimet, and Twenty Sixteen
17+
* $ wp reinstall
18+
* Downloading WordPress 4.7.10 (en_US)...
19+
* md5 hash verified: 57813ca592cd9a1eff210627ade9f350
20+
* Success: WordPress downloaded.
21+
* Installing Akismet Anti-Spam (3.3.2)
22+
* Plugin updated successfully.
23+
* Success: Installed 1 of 1 plugins.
24+
* Skipped hello plugin.
25+
* Installing Twenty Sixteen (1.3)
26+
* Theme updated successfully.
27+
* Success: Installed 1 of 1 themes.
28+
* Success: Reinstall complete.
1329
*/
1430
public function __invoke() {
1531
$core_version = WP_CLI::runcommand( 'core version', array( 'return' => true ) );

0 commit comments

Comments
 (0)