The MU forums have moved to WordPress.org

what do you put into mu-plugins (8 posts)

  1. Ovidiu
    Member
    Posted 18 years ago #

    hello,

    I know there have been numerous discussion regarding the use of the mu-plugins folder, still I am a little confused on how to actually use it.

    Until now, I put in there pretty anything I regard as basic for every blog plus all widgets.

    Why the widgets?

    I was asuming a lot of people (new to bloggind and wp in general) wouldn't know what a plugin / widget is and how to use it so I thought that if I make all widgets working from the mu-plugins folder, even the slightly confused ones, will eventually find the widgets menue below the presentation and figure out what they can do with those widgets....

    BUT I now realized, that a lot of widgets, call javascript and other stuff that gets loaded even if I do not use that widget on a certain blog. I was mistakenly believing that plugins/widgets only call their components if they are actually used on a blog...

    I mean the ideal scenario would be that they only call their respective scripts on pages/posts that do use their components, right?

    As an example I can give you some widgets I have in mu-plugins: democracy, anarchy media player, daiko's google video bar, etc.

    So now I am curious what your strategies are: what do you put into mu-plugins, I am not interested i nthe actual plugins/widgets, just wanna know your strategy or usage of this folder.

  2. lunabyte
    Member
    Posted 18 years ago #

    /me

    As little as possible. The less you put in there, the less that gets read in and executed. Whether a user wants to use it or not, they're going to. That's what mu-plugins does. It executes the whatever is in there, every time, rain or shine.

    Besides the "default" files with MU I keep Bad behavior, SK2, the main Widgets plugin, my dashboard notes plugin, my "non-empty" post title plugin, and that's it.

    Every thing else is in /plugins, which works fine for me. I'm considering moving the Widgets plugin (the main file, all the additional widgets are in the plugin dir) to the plugin directory as well.

    The way I look at it, is if it absolutely needs to be enabled, then it goes in mu-plugins. Even if 98 out of 100 users will enable it anyway, then that's still 2 sites that aren't parsing that code and every little bit helps.

    Take my little non-blank title plugin. I absolutely don't want someone posting something with a blank title. It mucks too much stuff up. How do you permalink to nothing? So, I put that in mu-plugins and forget about it.

    SK2 is another one. I want every user to use it, whether they "like it" or not. So, it's in there too.

    OK, so I have a plugin that generates a contact form and sends it to an address they specify. That isn't something I want to force people to use, so it's in the plugins directory. Same with the Flickr gallery plugin I'm using. As well as a feed copyright plugin, and a creative commons plugin as well, for example.

    I see plugins just like normal. They're plugins to use if desired. The nice thing about it is that if there is something specific I want all sites to use, then I have the option.

  3. amanzi
    Member
    Posted 18 years ago #

    Did you have any trouble getting SK2 to work in the mu-plugins folder? For some reason I thought there were issues with this, which is why I've always kept it in the plugins folder.

  4. Ovidiu
    Member
    Posted 18 years ago #

    lunabyte is most certainly talking about the wpmu-sk2 version available on wpmudev.org

  5. amanzi
    Member
    Posted 18 years ago #

    Cool - hadn't seen that version of the plugin yet. Thanks.

  6. lunabyte
    Member
    Posted 18 years ago #

    Yep. That would be correct.

    Also, as another note, I also have a private plugins directory that is just for my main blog. (aka: wp_1_...). I put up a small edit to wp-settings in regards to this not too long ago. A month or two maybe.

    Oh, I also have another plugins dir on top of that which I'm experimenting with at the moment. It adds to the main plugin array under certain parameters, so if a site meets certain criteria, they also see and have the capability to activate the additional plugins.

  7. Ovidiu
    Member
    Posted 18 years ago #

    @ lunabyte

    I have been searching for your post, or anyone elses post as I'd like to get more info on how to add another plugins folder (which I would love to use for testing and modifying plugins)

    can you give me some more hints what needs to be done?

  8. lunabyte
    Member
    Posted 18 years ago #

About this Topic