PHPackages                             humanmade/mu-plugins-loader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. humanmade/mu-plugins-loader

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

humanmade/mu-plugins-loader
===========================

A WordPress must-use plugin autoloader for mu-plugins in directories

1.0.1(2y ago)1128.3k↓24.5%1[1 PRs](https://github.com/humanmade/mu-plugins-loader/pulls)GPL-2.0-or-laterPHP

Since Mar 20Pushed 2y ago3 watchersCompare

[ Source](https://github.com/humanmade/mu-plugins-loader)[ Packagist](https://packagist.org/packages/humanmade/mu-plugins-loader)[ RSS](/packages/humanmade-mu-plugins-loader/feed)WikiDiscussions main Synced yesterday

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

MU Plugins Loader
=================

[](#mu-plugins-loader)

A composer based must-use plugin loader for WordPress.

This package is a simple composer plugin that creates a file called `loader.php` in your MU plugins directory that automatically includes the plugin and files you specify.

This is useful if you want to organise and load MU plugins from a subdirectory of the mu plugins folder, as WordPress does not do this automatically.

Installation
------------

[](#installation)

```
composer require humanmade/mu-plugins-loader
```

Usage
-----

[](#usage)

The package a few options for configuration:

### Using `composer.json`

[](#using-composerjson)

The package will read your `composer.json` file during the autoload dump step of an installation for 2 configuration options:

- `extra.mu-plugins`: an array of paths relative to your mu-plugins directory
- `extra.mu-plugins-path`: a string path to your mu-plugins directory
    - **note**: this is *only* required if you don't specify a different path under the `installer-paths` configuration and also different to `wp-content/mu-plugins`

Example:

```
{
    "extra": {
        "mu-plugins": [
            "authorship/plugin.php"
        ],
        "installer-paths": {
            "/content/mu-plugins/{$name}/": {
                "humanmade/authorship",
                "type:wordpress-muplugin"
            }
        }
    }
}
```

### Using `HM_MU_PLUGINS` constant

[](#using-hm_mu_plugins-constant)

If you need to apply some logic or simply prefer to define your MU plugins list in PHP you can ignore the `composer.json` configuration and instead define `HM_MU_PLUGINS` as an array before the loader plugin is included.

The simplest way to do this is to add a mu plugin with an alphabetically lower name and define it there e.g.:

```
# wp-content/mu-plugins/0000-plugins.php

define( 'HM_MU_PLUGINS', [
    'authorship/plugin.php',
] );
```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~210 days

Total

2

Last Release

989d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/77dbeefb7745010589603f2ffc6ff310d8f700b58e08d52af190744c43342526?d=identicon)[roborourke](/maintainers/roborourke)

---

Top Contributors

[![roborourke](https://avatars.githubusercontent.com/u/23417?v=4)](https://github.com/roborourke "roborourke (14 commits)")[![johnbillion](https://avatars.githubusercontent.com/u/208434?v=4)](https://github.com/johnbillion "johnbillion (1 commits)")

### Embed Badge

![Health badge](/badges/humanmade-mu-plugins-loader/health.svg)

```
[![Health](https://phpackages.com/badges/humanmade-mu-plugins-loader/health.svg)](https://phpackages.com/packages/humanmade-mu-plugins-loader)
```

###  Alternatives

[symfony/runtime

Enables decoupling PHP applications from global state

74798.8M1.0k](/packages/symfony-runtime)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5344.1M561](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2124.7M203](/packages/drupal-core-project-message)[vaimo/composer-patches

Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and patch command for testing/troubleshooting added patches.

3014.6M25](/packages/vaimo-composer-patches)[sandersander/composer-link

Adds ability to link local packages for development with composer

98457.9k](/packages/sandersander-composer-link)[phpro/grumphp-shim

GrumPHP Phar distribution

294.7M340](/packages/phpro-grumphp-shim)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
