PHPackages                             stellarwp/harbor - 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. stellarwp/harbor

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

stellarwp/harbor
================

A library that integrates a WordPress product with the Liquid Web licensing system.

v1.4.0(1mo ago)021.6k↑1029.2%[1 PRs](https://github.com/stellarwp/harbor/pulls)GPL-2.0-or-laterPHPPHP &gt;=7.4CI passing

Since Apr 16Pushed 3w agoCompare

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

READMEChangelog (10)Dependencies (21)Versions (31)Used By (0)

Harbor
======

[](#harbor)

Bundled library that handles licensing, updates, and feature gating for WordPress plugins and themes.

[![PHP Compatibility](https://github.com/stellarwp/harbor/actions/workflows/compatibility.yml/badge.svg)](https://github.com/stellarwp/harbor/actions/workflows/compatibility.yml)[![PHP Tests](https://github.com/stellarwp/harbor/actions/workflows/tests-php.yml/badge.svg)](https://github.com/stellarwp/harbor/actions/workflows/tests-php.yml)[![PHPStan](https://github.com/stellarwp/harbor/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/stellarwp/harbor/actions/workflows/static-analysis.yml)[![E2E Tests](https://github.com/stellarwp/harbor/actions/workflows/tests-e2e.yml/badge.svg)](https://github.com/stellarwp/harbor/actions/workflows/tests-e2e.yml)

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

[](#installation)

It's recommended that you install Harbor as a project dependency via [Composer](https://getcomposer.org/):

```
composer require stellarwp/harbor
```

> We *actually* recommend that this library gets included in your project using [Strauss](https://github.com/BrianHenryIE/strauss).
>
> Luckily, adding Strauss to your `composer.json` is only slightly more complicated than adding a typical dependency, so checkout our [strauss docs](https://github.com/stellarwp/global-docs/blob/main/docs/strauss-setup.md).

Initialize the library
----------------------

[](#initialize-the-library)

Initializing the Harbor library should be done within the `plugins_loaded` action, preferably at priority `0`.

Harbor only boots its providers when at least one premium plugin announces itself via the `lw_harbor/premium_plugin_exists` filter. **The filter must be attached before `Harbor::init()` is called**, otherwise the gate inside `Harbor::init()` short-circuits and the providers, REST routes, admin page, and `lw_harbor/loaded` action are never registered. The simplest pattern is to add the filter on the line immediately above the `Harbor::init()` call (as shown below), but anywhere earlier in the request works just as well.

```
use LiquidWeb\Harbor\Config;
use LiquidWeb\Harbor\Harbor;

add_action( 'plugins_loaded', function() {
 /**
  * Configure the container.
  *
  * The container must be compatible with stellarwp/container-contract.
  * See here: https://github.com/stellarwp/container-contract#usage.
  *
  * If you do not have a container, we recommend https://github.com/lucatume/di52
  * and the corresponding wrapper:
  * https://github.com/stellarwp/container-contract/blob/main/examples/di52/Container.php
  */
 $container = new Container();
 // Use a plugin basename constant defined in your main plugin file,
 // e.g. define( 'MY_PLUGIN_BASENAME', plugin_basename( __FILE__ ) )
 Config::set_plugin_basename( MY_PLUGIN_BASENAME );
 Config::set_container( $container );

 // Announce that this premium plugin should bring Harbor online.
 // Must be added before Harbor::init(). Anywhere earlier in the request works,
 // but the line above the call is the simplest pattern.
 add_filter( 'lw_harbor/premium_plugin_exists', '__return_true' );

 Harbor::init();
}, 0 );
```

Translation
-----------

[](#translation)

Package is using `__( 'Invalid request: nonce field is expired. Please try again.', '%TEXTDOMAIN%' )` function for translation. In order to change domain placeholder `'%TEXTDOMAIN%'` to your plugin translation domain run

```
./bin/stellar-harbor domain=
```

or

```
./bin/stellar-harbor
```

and prompt the plugin domain You can also add lines below to your composer file in order to run command automatically

```
"scripts": {
 "stellar-harbor": [
   "vendor/bin/stellar-harbor domain="
 ],
 "post-install-cmd": [
   "@stellar-harbor"
 ],
 "post-update-cmd": [
   "@stellar-harbor"
 ]
  }
```

Registering a plugin
--------------------

[](#registering-a-plugin)

Harbor discovers your plugin's embedded key automatically by scanning active plugins for a file named `LWSW_KEY.php` in the plugin root. No filter registration is required. See the [Harbor Integration Guide](/docs/guides/integration.md) for more details.

Changelog
---------

[](#changelog)

This project uses [@stellarwp/changelogger](https://github.com/stellarwp/changelogger) to manage its changelog. All notable changes are tracked via changelog entry files in the `changelog/` directory.

To add a new changelog entry:

```
bunx @stellarwp/changelogger add
```

To compile changelog entries into `changelog.txt`:

```
bunx @stellarwp/changelogger write --overwrite-version
```

Releasing
---------

[](#releasing)

1. Run the **Release Prep** workflow (`Actions → Release Prep → Run workflow`). Supply the target branch, version (e.g. `1.2.0`), and the release date (e.g. `2026-04-29`). The workflow bumps the `VERSION` constant, compiles the changelog, and opens a PR automatically.
2. Review and merge the PR.
3. Create a GitHub Release with a new tag in the format `vX.X.X` targeting the merge commit.

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

[](#documentation)

Start with [Harbor Overview](/docs/harbor.md) for the full architecture.

### Subsystems

[](#subsystems)

- [Licensing](/docs/subsystems/licensing.md) — Key discovery, API responses, validation workflows, caching.
- [Catalog](/docs/subsystems/catalog.md) — Product families, tiers, features, the Commerce Portal API.
- [Features](/docs/subsystems/features.md) — Feature types, resolution, strategies, Manager API.
- [Cron](/docs/subsystems/cron.md) — Scheduled refresh of catalog and licensing data.
- [Frontend](/docs/subsystems/frontend.md) — React app, @wordpress/data store, component hierarchy, CSS scoping.
- [Notices](/docs/subsystems/notices.md) — Admin notices, legacy license warnings, persistent dismissal.

### Architecture

[](#architecture)

- [Unified License Key](/docs/architecture/unified-license-key-system-design.md) — Key model, seat mechanics, system boundaries.
- [Fat Leader / Thin Instance](/docs/architecture/fat-leader-thin-instance.md) — Leader election, cross-instance hooks.
- [Conventions](/docs/architecture/conventions.md) — Naming conventions for namespaces, packages, identifiers.

### API Reference

[](#api-reference)

- [REST: License](/docs/api/rest/license.md) — License endpoints.
- [REST: Catalog](/docs/api/rest/catalog.md) — Catalog endpoints.
- [REST: Features](/docs/api/rest/features.md) — Feature endpoints.
- [REST: Legacy Licenses](/docs/api/rest/legacy-licenses.md) — Legacy license endpoints.
- [Liquid Web Licensing v1](/docs/api/liquid-web-software-licensing-v1.md) — External licensing API consumed by Harbor.

### Guides

[](#guides)

- [Integration Guide](/docs/guides/integration.md) — How to integrate your plugin with Harbor.
- [CLI Commands](/docs/guides/cli.md) — WP-CLI commands for feature management.
- [Testing](/docs/guides/testing.md) — PHP tests with Codeception/`slic`; E2E tests with Playwright/wp-env.

### Plugins with Harbor

[](#plugins-with-harbor)

Plugin nameRepositoryDistributionNoteGiveWP[impress-org/givewp](https://github.com/impress-org/givewp)[wp.org](https://wordpress.org/plugins/give/)LearnDash[stellarwp/learndash-core](https://github.com/stellarwp/learndash-core)[Herald](https://herald.nexcess.com/admin/products/sfwd-lms)MemberDash[stellarwp/memberdash](https://github.com/stellarwp/memberdash)[Herald](https://herald.nexcess.com/admin/products/memberdash)The Events Calendar[the-events-calendar/the-events-calendar](https://github.com/the-events-calendar/the-events-calendar)[wp.org](https://wordpress.org/plugins/the-events-calendar/)[tribe-common](https://github.com/the-events-calendar/tribe-common) should be updated firstEvent Tickets[the-events-calendar/event-tickets](https://github.com/the-events-calendar/event-tickets)[wp.org](https://wordpress.org/plugins/event-tickets/)[tribe-common](https://github.com/the-events-calendar/tribe-common) should be updated firstKadence Memberships Pro[stellarwp/restrict-content-pro](https://github.com/stellarwp/restrict-content-pro)[Herald](https://herald.nexcess.com/admin/products/restrict-content-pro)Kadence Blocks[stellarwp/kadence-blocks](https://github.com/stellarwp/kadence-blocks)[wp.org](https://wordpress.org/plugins/kadence-blocks/)Kadence Shop Kit[stellarwp/kadence-shop-kit](https://github.com/stellarwp/kadence-shop-kit)[Herald](https://herald.nexcess.com/admin/products/kadence-shop-kit)Kadence Theme Kit Pro[stellarwp/kadence-pro](https://github.com/stellarwp/kadence-pro)[Herald](https://herald.nexcess.com/admin/products/kadence-theme-pro)

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance95

Actively maintained with recent releases

Popularity29

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor4

4 contributors hold 50%+ of commits

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 ~2 days

Total

16

Last Release

33d ago

Major Versions

v0.1.8 → v1.0.02026-04-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/70a2847a265444714b48c64eceb3ca742baa3a56757ce65b18bd7bbbbf910312?d=identicon)[dpanta94](/maintainers/dpanta94)

![](https://www.gravatar.com/avatar/97fd764aa710e8d8263a7e3b3fececdfd736b8aad8055227bf592ddf50ad15ba?d=identicon)[stellarwp](/maintainers/stellarwp)

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

---

Top Contributors

[![pauloiankoski](https://avatars.githubusercontent.com/u/3921017?v=4)](https://github.com/pauloiankoski "pauloiankoski (420 commits)")[![estevao90](https://avatars.githubusercontent.com/u/18039589?v=4)](https://github.com/estevao90 "estevao90 (358 commits)")[![d4mation](https://avatars.githubusercontent.com/u/7770631?v=4)](https://github.com/d4mation "d4mation (313 commits)")[![jonwaldstein](https://avatars.githubusercontent.com/u/10138447?v=4)](https://github.com/jonwaldstein "jonwaldstein (257 commits)")[![nikolaystrikhar](https://avatars.githubusercontent.com/u/4025589?v=4)](https://github.com/nikolaystrikhar "nikolaystrikhar (247 commits)")[![defunctl](https://avatars.githubusercontent.com/u/1066195?v=4)](https://github.com/defunctl "defunctl (206 commits)")[![borkweb](https://avatars.githubusercontent.com/u/430385?v=4)](https://github.com/borkweb "borkweb (142 commits)")[![MlKilderkin](https://avatars.githubusercontent.com/u/25453018?v=4)](https://github.com/MlKilderkin "MlKilderkin (136 commits)")[![dpanta94](https://avatars.githubusercontent.com/u/29694484?v=4)](https://github.com/dpanta94 "dpanta94 (91 commits)")[![tarecord](https://avatars.githubusercontent.com/u/6947218?v=4)](https://github.com/tarecord "tarecord (31 commits)")[![johnhooks](https://avatars.githubusercontent.com/u/20690965?v=4)](https://github.com/johnhooks "johnhooks (30 commits)")[![jamesckemp](https://avatars.githubusercontent.com/u/1853915?v=4)](https://github.com/jamesckemp "jamesckemp (29 commits)")[![redscar](https://avatars.githubusercontent.com/u/12241059?v=4)](https://github.com/redscar "redscar (26 commits)")[![lucatume](https://avatars.githubusercontent.com/u/2749650?v=4)](https://github.com/lucatume "lucatume (11 commits)")[![dave-green-uk](https://avatars.githubusercontent.com/u/3214928?v=4)](https://github.com/dave-green-uk "dave-green-uk (7 commits)")[![shvlv](https://avatars.githubusercontent.com/u/3157352?v=4)](https://github.com/shvlv "shvlv (5 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (4 commits)")[![Rahmon](https://avatars.githubusercontent.com/u/6010232?v=4)](https://github.com/Rahmon "Rahmon (3 commits)")[![pramodjodhani](https://avatars.githubusercontent.com/u/5794565?v=4)](https://github.com/pramodjodhani "pramodjodhani (3 commits)")[![jesseeproductions](https://avatars.githubusercontent.com/u/8312466?v=4)](https://github.com/jesseeproductions "jesseeproductions (3 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/stellarwp-harbor/health.svg)

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

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[cakephp/cakephp

The CakePHP framework

8.8k19.1M1.7k](/packages/cakephp-cakephp)[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

7.9k1.1B3.7k](/packages/guzzlehttp-psr7)[mollie/mollie-api-php

Mollie API client library for PHP. Mollie is a European Payment Service provider and offers international payment methods such as Mastercard, VISA, American Express and PayPal, and local payment methods such as iDEAL, Bancontact, SOFORT Banking, SEPA direct debit, Belfius Direct Net, KBC Payment Button and various gift cards such as Podiumcadeaukaart and fashioncheque.

60315.4M74](/packages/mollie-mollie-api-php)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35729.6k2](/packages/telnyx-telnyx-php)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

84735.1k](/packages/flow-php-flow)

PHPackages © 2026

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