Site specific mu-plugins

August 24, 2009  | 
6 Comments

I think we can all admit that WordPress MU is a pretty powerful platform (otherwise, why are you here?), there are numerous advantages to hosting multiple distinct sites and blogs with a single core application and code-base.

One of which is a common collection of plugins. Sometimes, however, you find yourself wanting a bit of variety. You don’t want the overhead of loading all of the sitewide (mu-plugins) plugins on every site.

Some you only want for your own blog, or you want different sites to have distinct sets of plugins. This, of course, can be achieved by putting your plugins in the standard plugins directory, but will reveal them to all who have the ability to activate and deactivate them.

I found myself in this situation recently whilst running a number of sites of a single install. The solution is a rather neat little plugin which allows each site and / or blog to have its very own mu-plugins directory.

Site based mu-plugins plugin

You can grab the plugin for free from the WPMUdev.org site. The setup is a little bit more involved than a normal plugin, so I shall go through an example set up below.

20090824-edi8qiireqqs1c3tjidc3ra9rs

Above is a screenshot of the sites I have running on my server. Each of these sites, realistically, needs a different set of core plugins, but I don’t want to have to use a different WPMU install for each site OR have all the plugins running for all the sites.

The screenshot below shows an example of the layout for my mu-plugins directory.

20090824-ed79yqbhrsyb6srkxp8bth1k4f

In it you can see that I have a single plugin in the mu-plugins directory, which is our site based plugin. You should place any plugin which is common across all sites in the main directory as well, as they will be loaded as normal.

I have setup a sub-directory for each of the main domains that I have specific plugins available for. I will place the plugins for each site in relevant directories.

You can see above that as well as a clearskys.net directory, I have a blog.clearskys.net directory. Plugins added to the clearskys.net directory will be loaded on any blog for that domain. The plugins in the blog.clearskys.net directory are those that I only want loaded on that specific blog.

I hope you can find a use for the plugin. Let me know how it works out for you.

Featured Plugin - Host sites, get paid, just like WordPress.com

If you've ever wondered how you could offer a paid site management and hosting service, then this is the plugin for you. Offer a freemium or paid service, for any niche you like, it's powered Edublogs.org to success already!
Find out more

Featured Plugin - Start your own Quora / StackOverflow / Yahoo Q&A site

It's now incredibly easy to start your own Q&A site using nothing more than WordPress - The Q&A plugin simply and brilliantly transforms any site, or page, into a perfect support or Q&A environment.
Find out more

Featured Plugin - Send beautiful html email newsletters, from WordPress!

Now there's no need to pay for a third party service to sign up, manage and send beautiful email newsletters to your subscriber base - this plugin has got the lot.
Find out more

Featured Plugin - WordPress + Google Maps = Perfect

Simply insert google maps into posts, sidebars and pages - show directions, streetview, provide image overlays and do it all from a simple button and comprehensive widget.
Find out more

Featured Plugin - Open an Online Store with MarketPress

Out of all the WordPress ecommerce plugins available, this has got to be the winner - easy to configure, powerful functionality, multiple gateways and more. A simply brilliant plugin!
Find out more

Featured Plugin - Turn any WordPress page into a fully featured wiki!

To get a wiki up and running you used to need to install Mediawiki and toil away for days configuring it... not any more! This plugin gives you *all* the functionality you want from a wiki, in WordPress!!!
Find out more

Featured Plugin - Every great SEO tweak you need, in one snazzy bundle

Fully integrated with the SEOMoz API, complete with automatic links, sitemaps and SEO optimization of your WordPress setup - this is the only plugin you need to help you rank your site number 1 on Google - nothing else compares.
Find out more

Featured Plugin - Add bottom corner (or anywhere else) chat to your site

No javascript required, no third part chat engine, just fully featured chat right in your own database on your own WP sites - couldn't be easier.
Find out more

Featured Plugin - Start Your Own Powerful Membership Site

If you're thinking about starting a paid, or just private, membership site then this is truly the plugin you've been looking for. Easy to use, massively configurable and ready to go out of the box!
Find out more

6 Responses to Site specific mu-plugins

  1. I installed the plugin exactly and I see nothing nowhere. Help???
    Must the blogs be “subdomains”? I am set up local on a wamp server with wordpress-mu set “subdirectories”.

    • I’m not sure what you are expecting to see David. It is transparent to the system. Also, unless you are running a multi-site system, it will be of little use to a sub-directory install.

  2. It is obviously not working for me. Where is the plugin I put in the mu-plugins sub dir? How do I activate it? Control it?

    • Hi David. The link to the plugin download is in post above. You place it in the mu-plugins directory and it activates and works automatically.
      You then set up the sub-directories under that directory as per the instructions above.

  3. Hmmm… That’s too bad.
    By the way… Anybody know how I can run BuddyPress on a specific Blog and NOT all the rest???

  4. It would be great if this worked for subdirectory installations of WPMU.
    How can that be done in the code?

Click on a tab to select how you'd like to leave your comment

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting