You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WP-CLI is a command line interface for WordPress. The project's goal is to offer a complete alternative to the WordPress admin; for any action you might want to perform in the WordPress admin, there should be an equivalent WP-CLI command.
8
8
9
-
For instance, because you can install a plugin from the WordPress admin, you can also [install a plugin](https://wp-cli.org/commands/plugin/install/) with WP-CLI:
9
+
For instance, because you can install a plugin from the WordPress admin, you can also [install a plugin](https://developer.wordpress.org/cli/commands/plugin/install/) with WP-CLI:
10
10
11
11
$ wp plugin install akismet
12
12
Installing Akismet (3.1.8)
@@ -15,7 +15,7 @@ For instance, because you can install a plugin from the WordPress admin, you can
15
15
Installing the plugin...
16
16
Plugin installed successfully.
17
17
18
-
And, because you can also activate plugins from the WordPress admin, you can [activate a plugin](https://wp-cli.org/commands/plugin/activate/) with WP-CLI:
18
+
And, because you can also activate plugins from the WordPress admin, you can [activate a plugin](https://developer.wordpress.org/cli/commands/plugin/activate/) with WP-CLI:
19
19
20
20
$ wp plugin activate akismet
21
21
Success: Plugin 'akismet' activated.
@@ -26,7 +26,7 @@ One key difference between using the WordPress admin and WP-CLI: performing any
26
26
27
27
Throughout your usage of WP-CLI, you'll hear certain terms used over and over again.
28
28
29
-
For instance, a _command_ is an atomic unit of WP-CLI functionality. `wp plugin install` is one such command, as is `wp plugin activate`. Commands represent a name (e.g. 'plugin install') and a callback, and are registered with `WP_CLI::add_command()` ([doc](/docs/internal-api/wp-cli-add-command/)).
29
+
For instance, a _command_ is an atomic unit of WP-CLI functionality. `wp plugin install` is one such command, as is `wp plugin activate`. Commands represent a name (e.g. 'plugin install') and a callback, and are registered with `WP_CLI::add_command()` ([doc](https://make.wordpress.org/cli/handbook/internal-api/wp-cli-add-command/)).
30
30
31
31
The _synopsis_ defines which _positional_ and _associative_ arguments a command accepts. Let's take a look at the synopsis for `wp plugin install`:
32
32
@@ -35,15 +35,15 @@ The _synopsis_ defines which _positional_ and _associative_ arguments a command
35
35
36
36
In this example, `<plugin|zip|url>...` is the accepted _positional_ argument. In fact, `wp plugin install` accepts the same positional argument (the slug, ZIP, or URL of a plugin to install) multiple times. `[--version=<version>]` is one of the accepted _associative_ arguments. It's used to denote the version of the plugin to install. Notice, too, the square brackets around the argument definition; square brackets mean the argument is optional.
37
37
38
-
WP-CLI also has a [series of _global_ arguments](/config/) which work with all commands. For instance, including `--debug` means your command execution will display all PHP errors, and add extra verbosity to the WP-CLI bootstrap process.
38
+
WP-CLI also has a [series of _global_ arguments](https://make.wordpress.org/cli/handbook/config/) which work with all commands. For instance, including `--debug` means your command execution will display all PHP errors, and add extra verbosity to the WP-CLI bootstrap process.
39
39
40
40
## Practical Examples
41
41
42
42
Ready to dive in? Here are some common examples of how WP-CLI is used:
43
43
44
44
**Download and install WordPress in seconds**
45
45
46
-
1. Download the latest version of WordPress with `wp core download` ([doc](https://wp-cli.org/commands/core/download/)).
46
+
1. Download the latest version of WordPress with `wp core download` ([doc](https://developer.wordpress.org/cli/commands/core/download/)).
47
47
48
48
```
49
49
$ wp core download --path=wpclidemo.dev
@@ -53,22 +53,22 @@ Using cached file '/home/vagrant/.wp-cli/cache/core/wordpress-4.6.1-en_US.tar.gz
53
53
Success: WordPress downloaded.
54
54
```
55
55
56
-
2. Create a new wp-config.php file with `wp config create` ([doc](https://wp-cli.org/commands/config/create/)).
56
+
2. Create a new wp-config.php file with `wp config create` ([doc](https://developer.wordpress.org/cli/commands/config/create/)).
Use `wp plugin update --all` ([doc](https://wp-cli.org/commands/plugin/update/)) to update all plugins to their latest version.
82
+
Use `wp plugin update --all` ([doc](https://developer.wordpress.org/cli/commands/plugin/update/)) to update all plugins to their latest version.
83
83
84
84
```
85
85
$ wp plugin update --all
@@ -106,7 +106,7 @@ Success: Updated 2/2 plugins.
106
106
107
107
**Add a user as a super-admin**
108
108
109
-
On multisite, use `wp super-admin add` ([doc](https://wp-cli.org/commands/super-admin/add/)) to grant super admin capabilities to an existing user.
109
+
On multisite, use `wp super-admin add` ([doc](https://developer.wordpress.org/cli/commands/super-admin/add/)) to grant super admin capabilities to an existing user.
If you've added or changed an image size registered with `add_image_size()`, you may want to use `wp media regenerate` ([doc](https://wp-cli.org/commands/media/regenerate/)) so your theme displays the correct image size.
118
+
If you've added or changed an image size registered with `add_image_size()`, you may want to use `wp media regenerate` ([doc](https://developer.wordpress.org/cli/commands/media/regenerate/)) so your theme displays the correct image size.
0 commit comments