WordPress: How To Disable A Network Enabled Plugin For Just One Site?

WordPress Multisites are a great way to manage multiple websites from a single WordPress admin and username. One thing that can get quite confusing is the use of plugins, especially on larger networks.

With multisite there are several different ways you can activate plugins:

There is an alternative to disable a network enabled plugin for only one site. The following should be placed within your theme’s functions.php template and will disable akismet on a blog with id 2:

add_filter('site_option_active_sitewide_plugins', 'modify_sitewide_plugins');

function modify_sitewide_plugins($value) {
    global $current_blog;

    if( $current_blog->blog_id == 2 ) {
        unset($value['akismet/akismet.php']);
    }

    return $value;
}
Free Graphics, Icons, Tutorials
Free Graphics Free Christmas Vector Icon Graphics Pack 2017Free Fitness Vector Icons Graphics PackFree Camping Vector Graphics PackFree Summer Graphics PackFree File Icon PackFree Fast Food Vector Graphics
Sharing is caring...
Like & Follow
Share the love, share this page! Facebook Twitter Digg Reddit LinkedIn Pinterest Email
Close [X]
The Web Taylor
1000 Lakeside North Harbour Portsmouth, Hampshire PO6 3EN
02392 123358