DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk9 min

How to Create and Install Must-Use Plugins in WordPress

Learn where WordPress must-use plugins go, how to create the mu-plugins folder, install loaders, verify automatic loading, and disable files safely.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To install a must-use (MU) plugin, create wp-content/mu-plugins/ in your WordPress installation and place a PHP file directly inside it. WordPress loads that file automatically on every request; there is no Activate button. In the dashboard, you can inspect MU plugins under Plugins > Must-Use, but you must use SFTP, SSH, or your hosting file manager to add, rename, or remove them.

This arrangement is useful for site-wide code that should always run, but it also removes the normal safety switch. A syntax error in one MU plugin can affect the entire site, and activation hooks do not run for MU plugins. The steps below show how to install a single-file or multi-file MU plugin, verify it, control load order, and recover when one is not appearing or breaks the site.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What a must-use plugin is

A must-use plugin is a WordPress plugin that is loaded automatically rather than activated from the regular Plugins screen. WordPress looks for MU plugins in the mu-plugins directory inside wp-content. The usual full path is:

/wp-content/mu-plugins/

WordPress does not normally create this directory for you. You create it manually, then upload PHP files into it. Once a file is in the correct location, WordPress includes it without an activation step.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

MU plugins are different from ordinary plugins in four important ways:

  • They are stored in wp-content/mu-plugins, not the normal wp-content/plugins directory.
  • They load automatically and have no activation or deactivation state.
  • They load before regular plugins and themes.
  • Activation hooks do not run, so code that depends on register_activation_hook() will not initialize in the usual way.

Every PHP file in the MU directory is loaded on every request. That makes the directory appropriate for essential site-wide behavior, but it also means that an unnecessary or untested file can slow or break the whole site.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What you need before installing one

  • Access to the WordPress files through SFTP, SSH, or your host’s file manager.
  • The correct document root for the site. It is the directory containing wp-admin, wp-includes, and wp-content.
  • A PHP file you trust and have tested, or the code for the MU plugin you are creating.
  • A recent backup, especially if the code will run on a production site.
  • A way to rename or delete the file outside WordPress in case it causes a fatal error.

Do not assume that the WordPress installation is in the web server’s top-level directory. On many hosts it is inside a site-specific folder. Start by locating the directory that contains wp-content; the MU path is relative to that directory.

How to create the mu-plugins folder

  1. Connect to the site with SFTP, SSH, or the host’s file manager.
  2. Open the WordPress installation directory and then open wp-content.
  3. Create a new directory named exactly mu-plugins using lowercase letters and a hyphen.
  4. Confirm that the resulting path is wp-content/mu-plugins/.

If your host already supplies a special MU-plugin directory, follow the host’s documented path instead. Managed platforms can change the location or reserve the directory for platform code. WordPress VIP, for example, uses a /client-mu-plugins directory at the root of the site’s code repository rather than the conventional path.

Install a single-file must-use plugin

A single-file MU plugin is the simplest arrangement. The PHP file must be directly inside the MU directory, not inside another folder.

  1. Create or obtain a PHP file, such as my-plugin.php.
  2. Upload it to wp-content/mu-plugins/my-plugin.php.
  3. Make sure the file extension is .php and that the upload completed without being renamed by your editor or file manager.
  4. Log in to WordPress and open Plugins > Must-Use to check that WordPress has detected it.

The file is loaded on the next WordPress request. There is no Activate button and no separate activation step. If the file contains an error, WordPress may fail before the dashboard can load; in that case, use SFTP, SSH, or the host’s file manager to rename the file.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

A minimal file example

This example adds a body class on the front end. Replace the callback with the site-specific behavior you need:

<?php
/**
 * Example must-use plugin.
 */

add_filter( 'body_class', function ( $classes ) {
    $classes[] = 'site-mu-enabled';
    return $classes;
} );

Save the file with a .php extension and upload it directly to wp-content/mu-plugins/. Because MU plugins are included automatically, this code should not be wrapped in an activation callback.

Install a multi-file must-use plugin

WordPress scans only PHP files at the top level of mu-plugins. It does not automatically search subdirectories. A multi-file plugin therefore needs a top-level loader file.

  1. Create a subdirectory such as wp-content/mu-plugins/my-plugin/.
  2. Put the main classes, functions, and supporting files in that subdirectory.
  3. Create a PHP loader directly inside wp-content/mu-plugins/, for example load-my-plugin.php.
  4. Have the loader require the main file using an absolute path based on the loader’s directory.
<?php
/**
 * Loads the files for the example MU plugin.
 */

require_once __DIR__ . '/my-plugin/my-plugin.php';

The important detail is the location: load-my-plugin.php is at the root of mu-plugins, while the implementation can remain in my-plugin/. Without that loader, WordPress will ignore PHP files that exist only in the subdirectory.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If the plugin has several dependencies, require them from the loader in the order they need. Use require_once to prevent the same file from being included twice when another component reaches it through a different path.

Check that the MU plugin loaded

  1. Sign in to the WordPress administration area.
  2. Go to Plugins > Must-Use.
  3. Look for the file or loader name in the list.
  4. Test the behavior the plugin is supposed to provide on both the front end and, where relevant, the administration area.

Being listed confirms that WordPress found the top-level PHP file. It does not prove that every callback or dependency is working, so test the actual feature as well. For a multi-file plugin, verify that the loader is listed and that its required files are readable.

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

When and in what order MU plugins load

MU plugins load before ordinary plugins and themes. Files in the MU directory are processed alphabetically. If one file must run before another, a common convention is to prefix filenames with numbers such as 00-bootstrap.php and 10-features.php. This naming pattern is a practical convention, not a documented requirement that guarantees ordering in every hosting implementation.

Keep dependencies explicit in a loader when order is important. Relying only on filenames can become fragile when another file is added, renamed, or supplied by the host.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How to deactivate or remove a must-use plugin

There is no Deactivate button for an MU plugin. To stop one from loading, change the file outside WordPress:

  1. Connect through SFTP, SSH, or the host’s file manager.
  2. Open wp-content/mu-plugins/, or the custom directory specified by your host.
  3. Rename the PHP file so it no longer has the expected active filename, for example from my-plugin.php to my-plugin.php.disabled, or move it out of the directory.
  4. Reload the site and test it.
  5. Delete the file only after you are certain you no longer need it.

For a multi-file plugin, rename or move the top-level loader. Leaving the implementation folder in place does nothing if no top-level loader requires it.

Why a must-use plugin is not showing

The folder is in the wrong WordPress installation

Sites can contain several WordPress copies, staging environments, or network installations. Confirm that the directory you edited contains the active site’s wp-admin and wp-includes folders, then check the path again: wp-content/mu-plugins/your-file.php.

The mu-plugins directory does not exist

WordPress does not create it by default. Create it manually under the active site’s wp-content directory, using the exact name mu-plugins.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

The PHP file is nested too deeply

A file such as mu-plugins/my-plugin/my-plugin.php will not be discovered by itself. Add a loader directly under mu-plugins and require the nested file.

The upload did not preserve the PHP file

Check that the filename ends in .php, not .php.txt, and that your file manager did not add a second extension. Also verify that the file is readable by the web server.

The host uses a different MU directory

Some managed hosts maintain their own MU directory or provide platform files that should not be edited. Check the host’s WordPress documentation before creating a competing directory. On WordPress VIP, the documented client location is /client-mu-plugins at the repository root.

The file is present but the site errors

Every top-level PHP file is loaded on every request, so a parse error, missing required file, or incompatible function can produce a white screen or HTTP 500 response. Use SFTP, SSH, or the file manager to rename the newest MU file or its loader, then reload the site. Once access is restored, inspect the PHP error log, correct the code, and upload it again.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

MU plugins versus ordinary plugins and drop-ins

Characteristic Ordinary plugin Must-use plugin Drop-in
Typical location wp-content/plugins wp-content/mu-plugins A special filename in wp-content, such as object-cache.php
How it starts Installed, then activated in the dashboard Loaded automatically when the file is in the MU directory Loaded by WordPress for a specific core subsystem
Admin activation control Activate and deactivate controls are available No activation or deactivation control Managed through its special file and hosting configuration
Load timing After MU plugins Before ordinary plugins and themes Depends on the subsystem it replaces or extends
Typical update path Dashboard, deployment, or file transfer File transfer or deployment; no normal plugin update workflow File transfer or host/platform tooling
Effect of a broken file Usually isolated until activated, though a broken active plugin can still stop WordPress Can affect every request as soon as it is uploaded Can interfere directly with the core service it replaces

Use an ordinary plugin when administrators need a dashboard switch or automatic update workflow. Use an MU plugin when code must be present before regular plugins and themes and should not be casually disabled. A drop-in is a separate WordPress mechanism for replacing particular services; it is not simply another name for an MU plugin.

Best practices for creating reliable MU plugins

Keep the top level small

Put only the files that WordPress must discover directly in mu-plugins. Use a loader for larger projects so classes, templates, tests, and third-party libraries remain organized in a subdirectory.

Make loading defensive

Use clear filenames, absolute paths based on __DIR__, and require_once for dependencies. Avoid assuming that a regular plugin has already loaded; MU plugins run earlier.

Do not depend on activation hooks

Because MU plugins have no activation event, setup that would normally run in register_activation_hook() must be handled another way. For database changes or one-time migrations, use an explicit version check that runs safely during normal requests and records completion, or perform the migration as a controlled deployment task.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Test before production

  • Check PHP syntax before uploading.
  • Test on a staging copy with the same PHP and WordPress versions as production.
  • Test front-end pages, the login screen, the dashboard, scheduled tasks, and command-line operations when the plugin affects them.
  • Keep a rollback copy and know the exact file to rename if the site becomes unavailable.

Limit privileges and side effects

Load only the code the site needs. Avoid expensive work on every request, write operations that run repeatedly without a guard, and unvalidated input. Since the file runs before themes and ordinary plugins, an error can prevent those layers from handling the request.

Changing the MU-plugin directory

WordPress installations can redefine the MU directory with the WPMU_PLUGIN_DIR constant in wp-config.php. This is an advanced configuration and is also used by some hosting platforms. Before editing it, identify the path WordPress is actually configured to scan and follow the host’s deployment rules. A folder at the conventional location will not help if the installation has been deliberately configured to use another directory.

On managed platforms, the provider may merge its own MU plugins with customer code, restrict direct uploads, or require deployment through a repository. Treat the provider’s documented location and release process as authoritative for that environment.

A practical installation checklist

  • The file is in the active site’s scanned MU directory.
  • The directory is named mu-plugins, unless the host documents a custom location.
  • Single-file plugins are directly under that directory.
  • Nested projects have a top-level loader that requires their files.
  • The code does not rely on an activation hook.
  • The file was checked for syntax and tested on a staging site.
  • You have SFTP, SSH, or file-manager access for emergency rollback.
  • The Must-Use screen and the plugin’s actual behavior have both been checked.

Once these checks pass, the MU plugin will load automatically on future WordPress requests. Manage it as code on the filesystem rather than as an item that can be switched on and off from the dashboard.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.