WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On a multisite network, I have some plugins that are network activated so they run on every site in the network. However, I want to disable all of the network active plugins on some of the sites.

How can I do this?

share|improve this question
up vote 2 down vote accepted

Multisite-wide active plugins are stored in the active_sitewide_plugins site option. We can hook into this option and return an empty array (no plugins are active).

This snippet should be installed as a Must-Use Plugin.


 * Plugin Name: Disable Sitewide Plugins
 * Author: Shea Bunge
 * Author URI: http://bungeshea.com
 * Version: 0.1

global $blog_id;

if ( in_array( $blog_id, array( 6, 9, 42 ) ) {
    add_filter( 'pre_site_option_active_sitewide_plugins', '__return_empty_array' );

Remember to replace array( 6, 9, 42 ) with an array of the blog IDs you want to disable network-wide plugins on.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.