PHPackages                             level-level/ll-plugin-autoloader - 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. level-level/ll-plugin-autoloader

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

level-level/ll-plugin-autoloader
================================

Simplifies loading the composer autoloader and mu-plugins in WordPress.

v3.2.0(1y ago)0194.0k↓100%MITPHP

Since Nov 23Pushed 1y ago3 watchersCompare

[ Source](https://github.com/level-level/ll-plugin-autoloader)[ Packagist](https://packagist.org/packages/level-level/ll-plugin-autoloader)[ RSS](/packages/level-level-ll-plugin-autoloader/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (14)Used By (0)

Level Level plugin autoloader
=============================

[](#level-level-plugin-autoloader)

When `0-loader.php` is inserted into the `mu-plugins` directory it will load all subdirectory plugin as it would normal plugins.

Configuration options
---------------------

[](#configuration-options)

You have multiple options to manipulate where the Plugin Loader will look for a vendor folder. Define one of the following values in wp-config:

### 1. Default == wp-content directory

[](#1-default--wp-content-directory)

If you define **nothing** it will load the same as 2. `wp-content` directory.

### 2. wp-content directory

[](#2-wp-content-directory)

Load from the parent directory above `mu-plugins` (should be the `wp-content` dir). This is only used when no `LL_AUTOLOAD_DIR` is set.

```
define('LL_AUTOLOAD_CONTENT_DIR', true);

```

### 3. Child theme

[](#3-child-theme)

Use the current Child theme via `get_stylesheet_directory` as the theme folder containing the vendor folder. This is only used when no `LL_AUTOLOAD_DIR` is set.

```
define('LL_AUTOLOAD_USE_CHILD', true);

```

### 4. Parent/default theme

[](#4-parentdefault-theme)

Use the current parent theme via `get_template_directory` as the theme folder containing the vendor folder. This is only used when no `LL_AUTOLOAD_DIR` is set.

```
define('LL_AUTOLOAD_USE_PARENT', true);

```

### 5. Custom path

[](#5-custom-path)

Use a specific directory. The script will still append `/vendor/autoload.php` to this path.

```
define('LL_AUTOLOAD_DIR', '/path/to/wordpress/theme/');

```

### Overview

[](#overview)

**Setting****Result**Nothingwp-content directory`define( 'LL_AUTOLOAD_DIR', '/tmp/' );``/tmp/``define( 'LL_AUTOLOAD_CONTENT_DIR', true );`wp-content directory`define( 'LL_AUTOLOAD_USE_CHILD', true );`Stylesheet directory (child theme)`define( 'LL_AUTOLOAD_USE_PARENT', true );`Template directory (parent theme)Pre and Post autoload
---------------------

[](#pre-and-post-autoload)

### Pre autoload

[](#pre-autoload)

Right before the vendor autoload file is loaded, the `pre-autoload.php` file in the directory specified as the autoload directory is required if it exists.

This file can be used to set environment variables required in composer loaded dependencies.

### Post autoload

[](#post-autoload)

Right after the vendor autoload file is loaded, but before the `mu-plugins` are loaded, the `post-autoload.php` file in the directory specified as the autoload directory is required if it exists.

This file can be used to bootstrap/configure mu-plugin loaded dependencies, or trigger actions that need to happen as early as possible, but autoloading to be set up.

Adding logging is an example of this. You probably require the Monolog composer dependency, but want it to be bootstrapped before we load the mu-plugins.

Force load normal plugins
-------------------------

[](#force-load-normal-plugins)

In some cases, loading a plugin as must-use plugin can cause issues with the plugin. Instead, you have the option to force load plugins like normal plugins.

In the path where also your vendor folder is, create a file called `ll-forced-plugins.json`. Inside, paste the following content.

```
{
	"forced_plugins": [
		{
			"slug": "first-plugin/first-plugin.php",
			"network": false
		},
		{
			"slug": "second-plugin/second-plugin.php",
			"network": true
		}
	]
}
```

The slug references the plugin file to load. Network determines if a plugin should be network activated if it's a multisite installation.

Please note these force activated plugins will only be activated when visiting the WP-admin. This is needed because some plugins want to perform actions like redirects directly after activation.

Upgrading from v2.x to v3.x
---------------------------

[](#upgrading-from-v2x-to-v3x)

In v3, the `wp-content` directory loads by default, instead of the template directory in v2. To restore behaviour, set `define( 'LL_AUTOLOAD_USE_PARENT', true );` in `wp-config.php`.

###  Health Score

40

—

FairBetter than 87% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~259 days

Recently: every ~379 days

Total

12

Last Release

606d ago

Major Versions

v1.1.0 → v2.0.02017-09-21

v2.2.3 → v3.0.02020-07-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/f965815b3bbdb7489ec30999837398c0f1d45b6881f2359cf0fb6e77dffaf3b5?d=identicon)[level-level](/maintainers/level-level)

---

Top Contributors

[![menno-ll](https://avatars.githubusercontent.com/u/50165380?v=4)](https://github.com/menno-ll "menno-ll (20 commits)")[![NielsdeBlaauw](https://avatars.githubusercontent.com/u/661876?v=4)](https://github.com/NielsdeBlaauw "NielsdeBlaauw (18 commits)")[![jmslbam](https://avatars.githubusercontent.com/u/145887?v=4)](https://github.com/jmslbam "jmslbam (7 commits)")[![kevinpoot](https://avatars.githubusercontent.com/u/36954637?v=4)](https://github.com/kevinpoot "kevinpoot (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/level-level-ll-plugin-autoloader/health.svg)

```
[![Health](https://phpackages.com/badges/level-level-ll-plugin-autoloader/health.svg)](https://phpackages.com/packages/level-level-ll-plugin-autoloader)
```

###  Alternatives

[naxeem/thaana-transliterator

Thaana transliterator

202.5k](/packages/naxeem-thaana-transliterator)

PHPackages © 2026

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