PHPackages                             afragen/wp-dependency-installer - 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. afragen/wp-dependency-installer

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

afragen/wp-dependency-installer
===============================

Library that helps WordPress plugin dependency management.

4.3.14(1y ago)218123.7k↓10.7%33[2 issues](https://github.com/afragen/wp-dependency-installer/issues)[2 PRs](https://github.com/afragen/wp-dependency-installer/pulls)MITPHPPHP &gt;=5.6

Since May 3Pushed 1y ago10 watchersCompare

[ Source](https://github.com/afragen/wp-dependency-installer)[ Packagist](https://packagist.org/packages/afragen/wp-dependency-installer)[ GitHub Sponsors](https://github.com/afragen)[ RSS](/packages/afragen-wp-dependency-installer/feed)WikiDiscussions develop Synced 2d ago

READMEChangelogDependencies (1)Versions (32)Used By (0)

WP Dependency Installer
=======================

[](#wp-dependency-installer)

- Contributors: [Andy Fragen](https://github.com/afragen), [Matt Gibbs](https://github.com/mgibbs189), [Raruto](https://github.com/Raruto), [contributors](https://github.com/afragen/wp-dependency-installer/graphs/contributors)
- Tags: plugin, dependency, install
- Requires at least: 5.1
- Requires PHP: 5.6
- Stable tag: master
- Donate link:
- License: MIT

This is a drop in class for developers to optionally or automatically install plugin dependencies for their own plugins or themes. It can install a plugin from wp.org, GitHub, Bitbucket, GitLab, Gitea, or a direct URL.

[Comprehensive information regarding WP Dependency Installer is available on the wiki.](https://github.com/afragen/wp-dependency-installer/wiki)

See also: [example plugin](https://github.com/afragen/wp-dependency-installer-examples).

Description
-----------

[](#description)

You can use **composer** to install this package within your WordPress plugin / theme.

**Please ensure you are using the latest version of this framework in your `composer.json`**

1. Within your plugin or theme root folder, run the following command:

```
composer require afragen/wp-dependency-installer
```

2. Then create a sample [**`wp-dependencies.json`**](https://github.com/afragen/wp-dependency-installer/wiki/Configuration#json-config-file-format) file

```
[
  {
    "name": "Git Updater",
    "host": "github",
    "slug": "git-updater/git-updater.php",
    "uri": "afragen/git-updater",
    "branch": "develop",
    "required": true,
    "token": null
  },
  {
    "name": "Query Monitor",
    "host": "wordpress",
    "slug": "query-monitor/query-monitor.php",
    "uri": "https://wordpress.org/plugins/query-monitor/",
    "optional": true
  },
  {
    "name": "Local Development",
    "host": "wordpress",
    "slug": "local-development/local-development.php",
    "uri": "https://wordpress.org/plugins/local-development/",
    "required": true
  }
]
```

You will then need to update `wp-dependencies.json` to suit your requirements.

3. Finally add the following lines to your plugin or theme's `functions.php` file:

```
require_once __DIR__ . '/vendor/autoload.php';
add_action( 'plugins_loaded', static function() {
  WP_Dependency_Installer::instance( __DIR__ )->run();
});
```

`WP_Dependency_Installer` should be loaded via an action hook like `plugins_loaded` or `init` to function properly as it requires `wp-includes/pluggable.php` to be loaded for `wp_create_nonce()`.

4. (optional) Take a look at some of built in [Hooks](https://github.com/afragen/wp-dependency-installer/wiki/Actions-and-Hooks) and [Functions](https://github.com/afragen/wp-dependency-installer/wiki/Helper-Functions) to further customize your plugin look and behaviour:

That's it, happy blogging!

Development
-----------

[](#development)

PRs are welcome against the `develop` branch.

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance45

Moderate activity, may be stable

Popularity52

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 91.5% 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 ~104 days

Recently: every ~205 days

Total

29

Last Release

430d ago

Major Versions

1.4.13 → 2.0.02019-09-16

2.1.1 → 3.0.02020-02-28

3.1.0 → 4.0.02021-09-23

PHP version history (2 changes)1.2.0PHP &gt;=5.3

2.0.0PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/82779a185fccde41e1dd3b914bde84cd6be76c8dcb8f6b983f461c8f5687a87e?d=identicon)[afragen](/maintainers/afragen)

---

Top Contributors

[![afragen](https://avatars.githubusercontent.com/u/1296790?v=4)](https://github.com/afragen "afragen (324 commits)")[![Raruto](https://avatars.githubusercontent.com/u/9614886?v=4)](https://github.com/Raruto "Raruto (22 commits)")[![sc0ttkclark](https://avatars.githubusercontent.com/u/709662?v=4)](https://github.com/sc0ttkclark "sc0ttkclark (4 commits)")[![paulgoodchild](https://avatars.githubusercontent.com/u/10562196?v=4)](https://github.com/paulgoodchild "paulgoodchild (2 commits)")[![brandonjp](https://avatars.githubusercontent.com/u/199599?v=4)](https://github.com/brandonjp "brandonjp (1 commits)")[![SteveJonesDev](https://avatars.githubusercontent.com/u/2895788?v=4)](https://github.com/SteveJonesDev "SteveJonesDev (1 commits)")

### Embed Badge

![Health badge](/badges/afragen-wp-dependency-installer/health.svg)

```
[![Health](https://phpackages.com/badges/afragen-wp-dependency-installer/health.svg)](https://phpackages.com/packages/afragen-wp-dependency-installer)
```

###  Alternatives

[afragen/github-updater

A plugin to automatically update GitHub, Bitbucket, GitLab, or Gitea hosted plugins, themes, and language packs.

3.3k20.4k](/packages/afragen-github-updater)[afragen/git-updater

A plugin to automatically update GitHub, Bitbucket, GitLab, or Gitea hosted plugins, themes, and language packs.

3.3k1.7k](/packages/afragen-git-updater)[tomatophp/filament-helpers

Helper Class Generator to manage your forms and table inside your filament app

128.1k](/packages/tomatophp-filament-helpers)

PHPackages © 2026

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