PHPackages                             alleyinteractive/composer-wordpress-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. alleyinteractive/composer-wordpress-autoloader

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

alleyinteractive/composer-wordpress-autoloader
==============================================

Autoload files using WordPress File Conventions using Composer

v1.3.0(11mo ago)13769.8k↓26.6%3[2 issues](https://github.com/alleyinteractive/composer-wordpress-autoloader/issues)[2 PRs](https://github.com/alleyinteractive/composer-wordpress-autoloader/pulls)20GPL-2.0-or-laterPHPPHP ^8.2CI passing

Since Feb 2Pushed 7mo ago28 watchersCompare

[ Source](https://github.com/alleyinteractive/composer-wordpress-autoloader)[ Packagist](https://packagist.org/packages/alleyinteractive/composer-wordpress-autoloader)[ RSS](/packages/alleyinteractive-composer-wordpress-autoloader/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (10)Dependencies (5)Versions (16)Used By (20)

Composer WordPress Autoloader
=============================

[](#composer-wordpress-autoloader)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7831a2d138777807d8d666910841f253cdc849bb57c2d79adf86bc5263d81874/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c6c6579696e7465726163746976652f636f6d706f7365722d776f726470726573732d6175746f6c6f616465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/alleyinteractive/composer-wordpress-autoloader)[![Tests](https://github.com/alleyinteractive/composer-wordpress-autoloader/actions/workflows/tests.yml/badge.svg)](https://github.com/alleyinteractive/composer-wordpress-autoloader/actions/workflows/tests.yml)

Autoload WordPress files configured via Composer that support the [WordPress Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/)using [alleyinteractive/wordpress-autoloader](https://github.com/alleyinteractive/wordpress-autoloader). Will load the autoloaded classes defined in your package and all autoloaded classes in your dependencies.

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

[](#installation)

You can install the package via Composer:

```
composer require alleyinteractive/composer-wordpress-autoloader
```

Usage
-----

[](#usage)

```
{
  "extra": {
    "wordpress-autoloader": {
      "autoload": {
        "My_Plugin_Namespace\\": "src/",
      },
      "autoload-dev": {
        "My_Plugin_Namespace\\Tests\\": "tests/",
      }
    }
  }
}
```

Once added, you can load `vendor/autoload.php` as normal and the autoloader will handle the rest. If that doesn't work, see [Automatically Injecting WordPress Autoloader](#automatically-injecting-wordpress-autoloader).

### Automatically Injecting WordPress Autoloader

[](#automatically-injecting-wordpress-autoloader)

By default Composer WordPress Autoloader will automatically load the WordPress autoloader. This is done by adding `src/autoload.php` as an autoloaded file to Composer. However, this may not always work under some circumstances including symlinks. When necessary, you can opt to inject the `vendor/wordpress-autoload.php` file into your `vendor/autoload.php` file. This is disabled by default and be enabled by setting `inject` to `true` in your `composer.json`.

```
{
  "extra": {
    "wordpress-autoloader": {
      "inject": true
    }
  }
}
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance55

Moderate activity, may be stable

Popularity47

Moderate usage in the ecosystem

Community34

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 79.4% 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 ~109 days

Recently: every ~275 days

Total

13

Last Release

347d ago

Major Versions

v0.8.1 → v1.0.02022-09-01

PHP version history (5 changes)0.1PHP &gt;=7.4

v0.4.0PHP ^7.4.0|^8.0|^8.1

v1.1.0PHP ^8.0

v1.2.0PHP ^8.1

v1.3.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/338d27065b1074f2d66d049d742f22996dd137eef6f91bc8f75350ceee1e8ef2?d=identicon)[srtfisher](/maintainers/srtfisher)

---

Top Contributors

[![srtfisher](https://avatars.githubusercontent.com/u/346399?v=4)](https://github.com/srtfisher "srtfisher (85 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (12 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (9 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (1 commits)")

---

Tags

composerphpwordpress

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/alleyinteractive-composer-wordpress-autoloader/health.svg)

```
[![Health](https://phpackages.com/badges/alleyinteractive-composer-wordpress-autoloader/health.svg)](https://phpackages.com/packages/alleyinteractive-composer-wordpress-autoloader)
```

###  Alternatives

[symfony/runtime

Enables decoupling PHP applications from global state

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

A flexible Composer project scaffold builder.

5346.5M600](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2125.4M213](/packages/drupal-core-project-message)[phpro/grumphp-shim

GrumPHP Phar distribution

284.9M348](/packages/phpro-grumphp-shim)[automattic/jetpack-autoloader

Creates a custom autoloader for a plugin or theme.

566.3M167](/packages/automattic-jetpack-autoloader)[altis/core

Core module for Altis

19233.0k4](/packages/altis-core)

PHPackages © 2026

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