PHPackages                             yaml-ns/wpp-framework - 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. [Framework](/categories/framework)
4. /
5. yaml-ns/wpp-framework

ActiveLibrary[Framework](/categories/framework)

yaml-ns/wpp-framework
=====================

Reusable WordPress plugin framework base.

v0.9.0(4w ago)01MITPHPPHP &gt;=8.1CI passing

Since May 12Pushed 4w agoCompare

[ Source](https://github.com/yaml-ns/WPP-Framework)[ Packagist](https://packagist.org/packages/yaml-ns/wpp-framework)[ RSS](/packages/yaml-ns-wpp-framework/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

WPP Framework
=============

[](#wpp-framework)

[![CI](https://github.com/yaml-ns/WPP-Framework/actions/workflows/tests.yml/badge.svg)](https://github.com/yaml-ns/WPP-Framework/actions/workflows/tests.yml)

Reusable PHP framework for building application-style WordPress plugins: REST APIs, admin screens, business services, assets, cron, permissions, modules and PHP views.

License: MIT.

Namespace:

```
YamlNs\WppFramework
```

Goal
----

[](#goal)

WPP Framework is a shared Composer library installed inside each consumer plugin. It avoids rewriting the same infrastructure for every plugin:

- plugin bootstrap;
- dependency injection container;
- service providers;
- REST routes and middleware;
- security helpers;
- custom post types and taxonomies;
- metaboxes and meta fields;
- admin pages and admin forms;
- admin CRUD screens;
- asset enqueueing;
- WordPress settings;
- cron jobs;
- AJAX actions;
- modules;
- PHP view rendering.

The framework supports multiple active plugins in the same WordPress installation. Each plugin gets its own `PluginContext`, container and provider list.

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

[](#installation)

Inside a consumer plugin:

```
{
  "require": {
    "yaml-ns/wpp-framework": "^0.9"
  }
}
```

Then run:

```
composer install
```

The framework package is a Composer `library`, not a `wordpress-plugin`.

Public Bootstrap
----------------

[](#public-bootstrap)

The main file of a consumer plugin can stay small:

```
