Check the mu-plugins folder in WordPress

Plugins to use, also known as mu-plugins, are plug-ins that allow developers to create plug-ins that are enabled by default on WordPress websites and allow users to disable them. They don’t have any.

The only way to disable one of the plugins on this website is to delete or move the file from the mu-plugins folder. Initially, mu-plugins were only available for WPMU, for those sites that used multiple blogs (multi-site). And make m-plugins activated on all websites.

As of WordPress version 2.8, this feature has been placed in the main branch, and the “MU” section in mu-plugins has become “must-use” by “multi-user”. In fact, the concept of the mu plugin from “Should this feature appear in all my blogs?” To “Is this feature so important that it can be considered a WordPress plugin?” Changed.

Folder path in mu-plugins


The way to disable mu-plugins plugins is to go to the wp-content / mu-plugins folder and delete the plugins folder

Note: The mu-plugins folder is not in the / wp-content path by default and you must create the mu-plugins folder manually.

Redirect the default folder

Paste the following code into the wp-config.php file to change the default path of the mu-plugins folder:

define('WPMU_PLUGIN_DIR', '/full/path/to/the/new/directory');
define('WPMU_PLUGIN_URL', 'http://URL/to/the/new/directory');

Significance and benefits of mu-plugins

Significance and benefits of mu-plugins

How do mu-plugins help us?

Mu-plugins are always active and do not need to be activated and cannot be accidentally deactivated by users. Activation of mu-plugins is done by uploading to the path of the mu-plugins folder and no login is required.

Mu-plugins are loaded and called before all other WordPress plugins. This can increase the performance of WordPress. For example, disabling parts of WordPress or applying certain settings (such as security and …) before launching other plugins will increase the performance and security of WordPress.

Note: The priority for loading mu-plugins is based on the letters of the English alphabet.

Warnings for using mu-plugins

With all the advantages of mu-plugins, there are some disadvantages:

  1. Mu-plugins update notifications are not visible in the WordPress dashboard, and the user or developer is responsible for updating and verifying them.
  2. WordPress activation hooks are not executable in the mu-plugins folder. Activation hooks are used to execute code to install or remove plugins. Plugins that use these activation hooks may not work properly.
  3. WordPress only pays attention to php files that are right in the mu-plugins folder and identifies them as plugins, and does not pay attention to other files in subfolders. Therefore, the plugin in a separate folder will not work. To resolve this issue, you can use a php file with the following contents as a PHP proxy boot in the mu-plugins folder
<?php // mu-plugins/load.php
require WPMU_PLUGIN_DIR.'/my-plugin/my-plugin.php';

Everything about the mu-plugins folder

Everything about the mu-plugins folder


By default, the mu-plugins folder does not exist in WordPress and can be created by the user or developer if needed. Constantly activating a plugin by uploading a php file to / wp-content / mu-plugins, in addition to the convenience of developers, can lead to security risks.

  1. If a suspicious file is uploaded to a folder, the hacker can steal the information and steal information and other purposes by hacking the script.
  2. If there is an error in the plug-in, the update notification is not visible in the dashboard and the user must personally check them manually.

The following solutions are recommended to reduce the risks:

  1. Change the resolution of this folder to 700 to prevent other users from viewing it
  2. Force renaming of the mu-plugins folder and mandatory addition of default redirect codes to the wp-config file
  3. Notify the user to change the default path to the plugin folder by adding the code specified in the wp-config file
  4. Advise users not to place simple plug-ins in the mu-plugin for notifying automatic update notifications

What are mu-plugins?

What are mu-plugins?

Frequently Asked Questions

1. What are MU attachments?

Plugins you should use. They are also called mandatory use or mu-plugin. These plugins are enabled by default in your WordPress, and it is also not possible to disable these plugins.

2. Is it possible to activate mu-plugins from the dashboard?

No, you can check if it is active only through the dashboard.

{“@context”: “”, “@type”: “FAQPage”, “mainEntity”: [{
“@type”: “Question”,
“name”: “MU-plugins چیست؟”,
“acceptedAnswer”: {
“@type”: “Answer”,
“text”: “افزونه هایی که باید از آن استفاده کنید. به آن ها must-use یا mu-plugin نیز گفته می شود. این افزونه ها به طور پیش فرض در وردپرس شما فعال می شوند، همچنین امکان غیرفعال کردن این پلاگین ها وجود ندارد.”
“@type”: “Question”,
“name”: “آیا امکان فعال سازی mu-plugins از داشبورد وجود دارد؟”,
“acceptedAnswer”: {
“@type”: “Answer”,
“text”: “خیر شما تنها می توانید فعال بودن یا نبودن آن را از طریق داشبورد چک کنید.”

View Mu-plugins folders in WordPress for the first time in Parsupak. appear.

Leave Your Comment

Your email address will not be published.

Supportscreen tag