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
One or more plugins to install. Accepts a plugin slug, the path to a local zip file, a URL to a remote zip file, or a URL to a WordPress.org plugin directory.
256
+
One or more plugins to install. Accepts a plugin slug, the path to a local zip file, a URL to a remote zip file or PHP file, or a URL to a WordPress.org plugin directory.
249
257
250
258
[--version=<version>]
251
259
If set, get that particular version from wordpress.org, instead of the
Retry downloads without certificate validation if TLS handshake fails. Note: This makes the request vulnerable to a MITM attack.
834
848
849
+
[--auto-update-indicated]
850
+
Only update plugins where the server response indicates an automatic update. Updates to the version indicated by the server, not necessarily the latest version. Cannot be used with `--version`, `--minor`, or `--patch`.
851
+
835
852
**EXAMPLES**
836
853
837
854
$ wp plugin update bbpress --version=dev
@@ -1261,6 +1278,7 @@ These fields are optionally available:
Retry downloads without certificate validation if TLS handshake fails. Note: This makes the request vulnerable to a MITM attack.
1589
1607
1608
+
[--auto-update-indicated]
1609
+
Only update themes where the server response indicates an automatic update. Updates to the version indicated by the server, not necessarily the latest version. Cannot be used with `--version`, `--minor`, or `--patch`.
Scenario: Install plugin from a single PHP file URL
278
+
Given a WP install
279
+
280
+
When I run `wp plugin install https://gist.githubusercontent.com/westonruter/dec7d190060732e29a09751ab99cc549/raw/d55866c2fc82ab16f8909ce73fc89986ab28d727/pwa-manifest-short-name.php --activate`
281
+
Then STDOUT should contain:
282
+
"""
283
+
Installing
284
+
"""
285
+
And STDOUT should contain:
286
+
"""
287
+
Downloading plugin file from
288
+
"""
289
+
And STDOUT should contain:
290
+
"""
291
+
Plugin installed successfully.
292
+
"""
293
+
And STDOUT should contain:
294
+
"""
295
+
Activating
296
+
"""
297
+
And the wp-content/plugins/pwa-manifest-short-name.php file should exist
298
+
299
+
When I run `wp plugin list --field=name`
300
+
Then STDOUT should contain:
301
+
"""
302
+
pwa-manifest-short-name
303
+
"""
304
+
305
+
When I run `wp plugin list --name=pwa-manifest-short-name --field=status`
306
+
Then STDOUT should be:
307
+
"""
308
+
active
309
+
"""
310
+
311
+
Scenario: Install plugin from a single PHP file URL with --force flag
312
+
Given a WP install
313
+
314
+
When I run `wp plugin install https://gist.githubusercontent.com/westonruter/dec7d190060732e29a09751ab99cc549/raw/d55866c2fc82ab16f8909ce73fc89986ab28d727/pwa-manifest-short-name.php`
315
+
Then STDOUT should contain:
316
+
"""
317
+
Plugin installed successfully.
318
+
"""
319
+
And the wp-content/plugins/pwa-manifest-short-name.php file should exist
320
+
321
+
When I try `wp plugin install https://gist.githubusercontent.com/westonruter/dec7d190060732e29a09751ab99cc549/raw/d55866c2fc82ab16f8909ce73fc89986ab28d727/pwa-manifest-short-name.php`
322
+
Then STDERR should contain:
323
+
"""
324
+
Warning: Plugin already installed.
325
+
"""
326
+
And STDOUT should contain:
327
+
"""
328
+
Success: Plugin already installed.
329
+
"""
330
+
331
+
When I run `wp plugin install https://gist.githubusercontent.com/westonruter/dec7d190060732e29a09751ab99cc549/raw/d55866c2fc82ab16f8909ce73fc89986ab28d727/pwa-manifest-short-name.php --force`
332
+
Then STDOUT should contain:
333
+
"""
334
+
Plugin installed successfully.
335
+
"""
336
+
And the wp-content/plugins/pwa-manifest-short-name.php file should exist
337
+
338
+
Scenario: Install plugin from a GitHub Gist page URL
339
+
Given a WP install
340
+
341
+
When I run `wp plugin install https://gist.github.com/westonruter/dec7d190060732e29a09751ab99cc549 --activate`
342
+
Then STDOUT should contain:
343
+
"""
344
+
Gist resolved to raw file URL.
345
+
"""
346
+
And STDOUT should contain:
347
+
"""
348
+
Installing
349
+
"""
350
+
And STDOUT should contain:
351
+
"""
352
+
Downloading plugin file from
353
+
"""
354
+
And STDOUT should contain:
355
+
"""
356
+
Plugin installed successfully.
357
+
"""
358
+
And STDOUT should contain:
359
+
"""
360
+
Activating
361
+
"""
362
+
And the wp-content/plugins/pwa-manifest-short-name.php file should exist
363
+
364
+
When I run `wp plugin list --name=pwa-manifest-short-name --field=status`
365
+
Then STDOUT should be:
366
+
"""
367
+
active
368
+
"""
369
+
277
370
Scenario: Install plugin using WordPress.org directory URL
0 commit comments