PHPackages                             millipress/millibase - 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. millipress/millibase

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

millipress/millibase
====================

Declarative WordPress settings framework. Define your settings page in PHP arrays — sections, fields, tabs, validation — and get a React UI automatically.

v2.6.0(3w ago)12.5k↑56.3%[3 PRs](https://github.com/MilliPress/MilliBase/pulls)1GPL-2.0-or-laterPHPPHP &gt;=7.4CI passing

Since Mar 9Pushed 3w agoCompare

[ Source](https://github.com/MilliPress/MilliBase)[ Packagist](https://packagist.org/packages/millipress/millibase)[ RSS](/packages/millipress-millibase/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (10)Dependencies (22)Versions (27)Used By (1)

MilliBase
=========

[](#millibase)

Declarative WordPress settings framework. Define your settings page in PHP arrays — tabs, sections, fields, validation — and get a React-powered admin UI automatically.

Requirements
------------

[](#requirements)

RequirementVersionPHP&gt;= 7.4WordPress&gt;= 6.0Quick Start
-----------

[](#quick-start)

> **⚠ Plugin authors: prefix MilliBase before shipping.**If you bundle MilliBase inside a distributed plugin, you **must** vendor-prefix it with [Strauss](https://github.com/BrianHenryIE/strauss) or php-scoper. Two plugins shipping the unprefixed `MilliBase\` namespace will collide at runtime — only one copy will load, and the other plugin runs against a version it wasn't tested with. See [Namespace Prefixing](docs/04-reference/04-namespace-prefixing.md) for setup and the rationale behind MilliBase's cross-prefix-tolerant typing.

```
composer require millipress/millibase
```

```
use MilliBase\Manager;

$manager = new Manager(
    slug: 'my-plugin',
    config: fn() => [
        'page_title' => __( 'My Plugin', 'my-plugin' ),
        'menu_title' => __( 'My Plugin', 'my-plugin' ),
        'header'     => [ 'title' => __( 'My Plugin Settings', 'my-plugin' ) ],
        'tabs'       => [
            [
                'name'     => 'general',
                'title'    => __( 'General', 'my-plugin' ),
                'sections' => [
                    [
                        'id'     => 'main',
                        'title'  => __( 'Main Settings', 'my-plugin' ),
                        'fields' => [
                            [
                                'key'     => 'general.enabled',
                                'type'    => 'toggle',
                                'label'   => __( 'Enable Feature', 'my-plugin' ),
                                'default' => true,
                            ],
                        ],
                    ],
                ],
            ],
        ],
    ],
);

// Programmatic access:
$manager->settings()->get('general.enabled'); // true
```

Features
--------

[](#features)

- **Declarative schema** — define tabs, sections, and fields in PHP arrays
- **React admin UI** — auto-generated from the schema using `@wordpress/components`
- **9 built-in field types** — text, number, password, toggle, select, unit, token-list, color, code
- **Custom extensibility** — register custom field types and custom tab components from JS
- **Conditional display** — show/hide fields based on other settings values
- **Settings priority** — constants &gt; config file &gt; database &gt; defaults
- **Encryption** — automatic sodium encryption for sensitive fields (keys prefixed with `enc_`)
- **Config file sync** — write settings to PHP files for pre-WordPress access (blog-aware per-operation; `_network-.php` mirror for network-mode)
- **Network mode** — `'network' => true` routes storage to `wp_sitemeta` and the admin page to Network Admin
- **Migrations** — declarative `name@version` one-shot runner with per-scope state (site / network)
- **Backup &amp; restore** — transient-based backup with 12-hour expiry
- **Import / export** — settings serialization with encryption handling
- **Tab overrides** — add-on plugins can extend or replace tabs and sections via filters
- **REST API** — namespaced `GET/POST /{namespace}/v1/settings` + custom action endpoints
- **WP-CLI** — auto-registered `wp  config` commands; two Managers sharing a `cli.slug` auto-merge into one tree

Documentation
-------------

[](#documentation)

Full documentation is in the [`docs/`](docs/) directory:

- [Introduction](docs/01-getting-started/01-introduction.md)
- [Installation](docs/01-getting-started/02-installation.md)
- [Configuration](docs/02-usage/01-configuration.md)
- [Schema Definition](docs/02-usage/02-schema-definition.md)
- [Programmatic Access](docs/02-usage/03-programmatic-access.md)
- [WP-CLI Commands](docs/02-usage/04-wp-cli.md)
- [Migrations](docs/02-usage/05-migrations.md)
- [Network Settings](docs/02-usage/06-network-settings.md)
- [Custom Field Types](docs/03-customization/01-custom-field-types.md)
- [Custom Tab Components](docs/03-customization/02-custom-tab-components.md)
- [Extending with Filters](docs/03-customization/03-extending-with-filters.md)
- [Reference: Field Types](docs/04-reference/01-field-types.md) · [Settings API](docs/04-reference/02-settings-api.md) · [Hooks &amp; Filters](docs/04-reference/03-hooks-and-filters.md) · [Namespace Prefixing](docs/04-reference/04-namespace-prefixing.md)

License
-------

[](#license)

GPL-2.0-or-later

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance95

Actively maintained with recent releases

Popularity24

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.3% 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 ~4 days

Total

21

Last Release

26d ago

Major Versions

v1.2.4 → v2.0.02026-03-31

### Community

Maintainers

![](https://www.gravatar.com/avatar/b1119667d96ab4063e83fd0cd4797ec2e010d86e24e1a4bec13ce9cc5f5b045f?d=identicon)[ouun](/maintainers/ouun)

---

Top Contributors

[![ouun](https://avatars.githubusercontent.com/u/32090713?v=4)](https://github.com/ouun "ouun (196 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (12 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (11 commits)")[![vdrnn](https://avatars.githubusercontent.com/u/58754?v=4)](https://github.com/vdrnn "vdrnn (5 commits)")[![millipress-bot[bot]](https://avatars.githubusercontent.com/u/159043088?v=4)](https://github.com/millipress-bot[bot] "millipress-bot[bot] (3 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/millipress-millibase/health.svg)

```
[![Health](https://phpackages.com/badges/millipress-millibase/health.svg)](https://phpackages.com/packages/millipress-millibase)
```

###  Alternatives

[orchestra/asset

Asset Component for Orchestra Platform

51177.8k4](/packages/orchestra-asset)[codein/ibexa-seo-toolkit

Ibexa Toolkit to advise users on best SEO practices.

112.5k](/packages/codein-ibexa-seo-toolkit)

PHPackages © 2026

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