PHPackages                             wpdesk/wp-init - 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. wpdesk/wp-init

ActiveLibrary[Framework](/categories/framework)

wpdesk/wp-init
==============

Bootstrap for a WordPress plugin

v1.0.0(3w ago)097MITPHPPHP &gt;=7.4 | ^8CI failing

Since Aug 8Pushed 2w agoCompare

[ Source](https://github.com/WP-Desk/wp-init)[ Packagist](https://packagist.org/packages/wpdesk/wp-init)[ Docs](https://gitlab.wpdesk.dev/wpdesk/wp-init)[ RSS](/packages/wpdesk-wp-init/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (17)Versions (12)Used By (0)

WordPress plugin initializer
============================

[](#wordpress-plugin-initializer)

`wp-init` keeps WordPress plugin bootstrapping in one small entrypoint and one declarative config file. It wires PHP-DI services, hookable classes, optional modules, boot gates, and activation/deactivation handlers.

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

[](#installation)

For the core bootstrap library:

```
composer require wpdesk/wp-init
```

For WP Desk free plugin defaults, install the free preset package instead:

```
composer require wpdesk/wp-init-plugin-free
```

For WP Desk paid plugin defaults, install the paid preset package:

```
composer require wpdesk/wp-init-plugin-paid
```

The preset packages install `wpdesk/wp-init` and the packages required by their modules.

Bootstrapping a plugin
----------------------

[](#bootstrapping-a-plugin)

Keep the main plugin file minimal:

```
