Title: How to make plugin activation optional on multisite install
Last modified: August 22, 2016

---

# How to make plugin activation optional on multisite install

 *  Resolved [Gregg](https://wordpress.org/support/users/lorax/)
 * (@lorax)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/make-plugin-activation-optional-on-multisite-install/)
 * I’ve written a plugin that I want to be active and available to admins of one
   of the websites in a multisite network. I’ve been trying to find the action/function
   to use so it won’t be activated on all sites.

Viewing 1 replies (of 1 total)

 *  Thread Starter [Gregg](https://wordpress.org/support/users/lorax/)
 * (@lorax)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/make-plugin-activation-optional-on-multisite-install/#post-5472208)
 * I figured it out. I was looking for a variable or way to give the menu scope 
   by using a special function. The answer is much easier. I used this:
 *     ```
       if (get_current_blog_id() <= 1 ) {
       All of the plugin processing code goes here.
       }
       ```
   
 * All of the plugin code within if statement is ignored if the condition is not
   met. In my case, I wanted the plugin to be live only on the first subsite and
   not the rest so I used the blog_id for that subsite.

Viewing 1 replies (of 1 total)

The topic ‘How to make plugin activation optional on multisite install’ is closed
to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 1 participant
 * Last reply from: [Gregg](https://wordpress.org/support/users/lorax/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/make-plugin-activation-optional-on-multisite-install/#post-5472208)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
