Skip to content

Commit a18dc54

Browse files
Update README.md
1 parent d837a71 commit a18dc54

File tree

1 file changed

+34
-4
lines changed

1 file changed

+34
-4
lines changed

README.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ See the WordPress [Plugin Handbook](https://developer.wordpress.org/plugins/) de
5757
Activates one or more plugins.
5858

5959
~~~
60-
wp plugin activate [<plugin>...] [--all] [--network]
60+
wp plugin activate [<plugin>...] [--all] [--exclude=<name>] [--network]
6161
~~~
6262

6363
**OPTIONS**
@@ -68,6 +68,9 @@ wp plugin activate [<plugin>...] [--all] [--network]
6868
[--all]
6969
If set, all plugins will be activated.
7070

71+
[--exclude=<name>]
72+
Comma separated list of plugin slugs to be excluded from activation.
73+
7174
[--network]
7275
If set, the plugin will be activated for the entire multisite network.
7376

@@ -90,7 +93,7 @@ wp plugin activate [<plugin>...] [--all] [--network]
9093
Deactivates one or more plugins.
9194

9295
~~~
93-
wp plugin deactivate [<plugin>...] [--uninstall] [--all] [--network]
96+
wp plugin deactivate [<plugin>...] [--uninstall] [--all] [--exclude=<name>] [--network]
9497
~~~
9598

9699
**OPTIONS**
@@ -104,6 +107,9 @@ wp plugin deactivate [<plugin>...] [--uninstall] [--all] [--network]
104107
[--all]
105108
If set, all plugins will be deactivated.
106109

110+
[--exclude=<name>]
111+
Comma separated list of plugin names that should be excluded from deactivation.
112+
107113
[--network]
108114
If set, the plugin will be deactivated for the entire multisite network.
109115

@@ -114,14 +120,20 @@ wp plugin deactivate [<plugin>...] [--uninstall] [--all] [--network]
114120
Plugin 'hello' deactivated.
115121
Success: Deactivated 1 of 1 plugins.
116122

123+
# Deactivate all plugins with exclusion
124+
$ wp plugin deactivate --all --exclude=hello,wordpress-seo
125+
Plugin 'contact-form-7' deactivated.
126+
Plugin 'ninja-forms' deactivated.
127+
Success: Deactivated 2 of 2 plugins.
128+
117129

118130

119131
### wp plugin delete
120132

121133
Deletes plugin files without deactivating or uninstalling.
122134

123135
~~~
124-
wp plugin delete [<plugin>...] [--all]
136+
wp plugin delete [<plugin>...] [--all] [--exclude=<name>]
125137
~~~
126138

127139
**OPTIONS**
@@ -132,6 +144,9 @@ wp plugin delete [<plugin>...] [--all]
132144
[--all]
133145
If set, all plugins will be deleted.
134146

147+
[--exclude=<name>]
148+
Comma separated list of plugin slugs to be excluded from deletion.
149+
135150
**EXAMPLES**
136151

137152
# Delete plugin
@@ -144,6 +159,12 @@ wp plugin delete [<plugin>...] [--all]
144159
Deleted 'tinymce-templates' plugin.
145160
Success: Deleted 1 of 1 plugins.
146161

162+
# Delete all plugins excluding specified ones
163+
$ wp plugin delete --all --exclude=hello-dolly,jetpack
164+
Deleted 'akismet' plugin.
165+
Deleted 'tinymce-templates' plugin.
166+
Success: Deleted 2 of 2 plugins.
167+
147168

148169

149170
### wp plugin get
@@ -578,7 +599,7 @@ inactive, then it will be activated.
578599
Uninstalls one or more plugins.
579600

580601
~~~
581-
wp plugin uninstall [<plugin>...] [--deactivate] [--skip-delete] [--all]
602+
wp plugin uninstall [<plugin>...] [--deactivate] [--skip-delete] [--all] [--exclude=<name>]
582603
~~~
583604

584605
**OPTIONS**
@@ -596,12 +617,21 @@ wp plugin uninstall [<plugin>...] [--deactivate] [--skip-delete] [--all]
596617
[--all]
597618
If set, all plugins will be uninstalled.
598619

620+
[--exclude=<name>]
621+
Comma separated list of plugin slugs to be excluded from uninstall.
622+
599623
**EXAMPLES**
600624

601625
$ wp plugin uninstall hello
602626
Uninstalled and deleted 'hello' plugin.
603627
Success: Uninstalled 1 of 1 plugins.
604628

629+
# Uninstall all plugins excluding specified ones
630+
$ wp plugin uninstall --all --exclude=hello-dolly,jetpack
631+
Uninstalled and deleted 'akismet' plugin.
632+
Uninstalled and deleted 'tinymce-templates' plugin.
633+
Success: Uninstalled 2 of 2 plugins.
634+
605635

606636

607637
### wp plugin update

0 commit comments

Comments
 (0)