The mu-plugins folder

Posted by Andrea under Plugins

One noticeable difference in the file structure between WordPress and WordPressMU is the addition of the mu-plugins folder. Files placed within this folder will be executed automatically.

If the plugin requires a hook into the plugin activation sequence, it will not be compatible with this auto-execution directory. If this is they case, you will either need to contact the plugin author and recommend a potential fix, or code one up yourself for your own use.

Plugins places in the mu-plugins directory will not show up in the Plugins menu.

Many plugins written to go specifically in this folder do not have an admin panel to show up in the admin area. These plugins usually have code that needs to be added somewhere, and it will mention this either at the top of the plugin’s file or in the plugin’s readme (if it has one). Since this feature is exclusive to MU, regular WordPress plugins placed in this folder may or may not work. If they do not work, it may be a small change needed to the code of the plugin in question. Each case is different and you will either have to read the code of the plugin or ask the plugin author. Please test new plugins one at a time.

Care should be taken as to what plugins are placed here, as and excessive amount will cause your site to slow down or use up resources, as code in this folder is executed on a continuing basis.

(props to lunabyte for clarification)

4 Responses to “The mu-plugins folder”

  1. au8ust Says:

    Hm… Mu seems to be more difficult than I think. Anyway, thanks to the great resources!

  2. Tom Fisher Says:

    Thanks for the info. I’m fairly new to WPMU, just got a site installed with it, and installed my first Plugin into the MU-Plugins folder, per it’s instructions. Went to activate it and it did not show in the Plugins menu. Thought I had done something wrong. I may still of done it wrong, but it now know that ones placed in the MU-Plugins don’t show.

    Thanks again,
    Tom

  3. TimFitz Says:

    Thanks for the info, this clears up a lot, I just started an Wordpress MU site and this helps.

  4. Dan Says:

    For some strange reason I do not have a mu-plugins folder in my wp-content folder. Did I do something wrong with my install?

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image

google.load("language", "1"); var curstate = 0; var hasloaded = 0; function bnc_show_translated() { if (hasloaded == 0) { bnc_lang_callback(); hasloaded = 1; } for (i = 0; i < 4; i++) { var elem = $("bnc_original_" + i); if (elem) { if (curstate) { elem.show(); } else { elem.hide(); } } } for (i = 0; i < 4; i++) { var elem = $("bnc_trans_" + i); if (elem) { if (curstate) { elem.hide(); } else { elem.show(); } } } if (curstate) { $("bnc_trans_state1").show(); $("bnc_trans_state2").hide(); curstate = 0; } else { $("bnc_trans_state1").hide(); $("bnc_trans_state2").show(); curstate = 1; } } function bnc_detect_div(div_id) { var text = document.getElementById(div_id); if (text) { text = text.innerHTML; if (text.length > 0) { google.language.detect(text, function(result) { if (!result.error) { if (result.language != "en") { if (result.confidence > 0.25) { $("bnc_translating").show(); bnc_xlate_div(result.language, div_id, "en"); } } } } ); } } } function bnc_xlate_div(src_lang,div_id,o_lang) { var text = document.getElementById(div_id); if (text) { text = text.innerHTML; google.language.translate(text, src_lang, o_lang, function(result) { var translated = document.getElementById(div_id); if (result.translation) { translated.innerHTML = result.translation; } }); } } function bnc_lang_callback() { bnc_xlate_div("en", "bnc_lang_i_0_7", "en"); bnc_xlate_div("en", "bnc_lang_i_1_7", "en"); bnc_xlate_div("en", "bnc_lang_i_2_7", "en"); bnc_xlate_div("en", "bnc_lang_i_3_7", "en"); bnc_xlate_div("en", "bnc_lang_i_4_7", "en"); bnc_xlate_div("en", "bnc_lang_i_5_7", "en"); } function bnc_startup() { bnc_xlate_div("en", "bnc_translate_info", "en"); bnc_xlate_div("en", "bnc_translate_info2", "en"); bnc_detect_div("bnc_lang_i_0_7");bnc_detect_div("bnc_lang_i_1_7");bnc_detect_div("bnc_lang_i_2_7");bnc_detect_div("bnc_lang_i_3_7");bnc_detect_div("bnc_lang_i_4_7");bnc_detect_div("bnc_lang_i_5_7"); } google.setOnLoadCallback(bnc_startup);
Close
E-mail It
This blog has been fine-tuned with 13 WordPress Tweaks.