The MU forums have moved to

Why (and how) the mu-plugin folder? (3 posts)

  1. artfraud
    Posted 14 years ago #

    Hello everyone - new to this, so bear with me.

    We've just installed Wordpress mu 2.8.6, but I'm not sure if we've quite got it right. The possible issue is with plugins (not the plugins themselves, but how they're handled in mu). Following the instructions on several mu plugins, we've copied the unzipped files into the mu-plugins folder - fine. But when we look in the Site Admin, there's no indication of these plugins: nothing under the Site Admin options, and no mention of them in the "home" blog plugins folder.

    Some of the plugins talk about having options to be set after install, so I'd expect to see something somewhere.

    If we install them, Wordpress style, by uploading from the plugins menu, then some at least install and appear, but checking the server they're in the plugins folder, not the mu-plugins folder... hmmm..

    Why is there a separate mu-plugins folder? Does it matter which folder the plugins go into? Do we need to alter a config file to bring the mu-plugins folder into play?

    Any advice would be very gratefully received.
    Cheers -- Tony

  2. kgraeme
    Posted 14 years ago #

    The mu-plugins folder was intended for plugins that need to be always on across all blogs. They do not show up in the list of plugins in the dashboard. One problem with the mu-plugins folder is that it doesn't allow plugins that are completely self-contained in their own folder. The plugin has to have a php file just sitting loose in the mu-plugins folder for it to be discovered.

    /mu-plugins/global-banner.php [works]
    /mu-plugins/global-banner/global-banner.php [doesn't work]

    So that means that many plugins simply won't work in the mu-plugins folder. There's also the issue of poorly coded plugins assuming they know the plugin directory path, which of course won't work with the mu-plugins directory.

    The mu-plugins directory is best used for MU specific plugins that affect the overall administration of the server.

    WordPress MU 2.7 introduced the ability for plugins in the regular plugins folder to be activated site-wide, effectively turning them into mu plugins. This is the best approach for blog-level plugins.

    There are tradeoffs with both approaches and which you use will depend on any given situation.

    There are also plugin management plugins for wpmu, such as Plugin Commander, that offer more granular control of activating plugins site-wide.

  3. artfraud
    Posted 14 years ago #

    Thanks :-) that's really helpful. Much appreciated.

About this Topic

  • Started 14 years ago by artfraud
  • Latest reply from artfraud