Skip to main content

wp plugin activate (Multisite Context)

Overview

In Multisite, you have two ways to activate plugins: per subsite, or Network-wide. Network-wide activation enables the plugin for all existing and future sites, and prevents individual site admins from deactivating it.

Syntax​

wp plugin activate <plugin>... [--url=<site-url>] [--network]

Options (Multisite Specific)​

FlagDescription
--networkActivate the plugin for the entire network
--urlActivate ONLY for the site at this URL

Basic Usage​

Network-wide activation​

wp plugin activate akismet --network

Output:

Success: Network activated plugin 'akismet'.

Activate for one subsite only​

wp plugin activate contact-form-7 --url=example.com/blog

Real-World Scenarios​

Scenario 1: Deploying a security plugin network-wide​

wp plugin install wordfence --activate --network

Next Steps​