PBJ.TECH — WordPress Plugins

PBJ License Manager — User Guide

Version 1.1.1 · pbj.tech/wordpress-plugins

PBJ License Manager — Install and Usage Guide

1. What this plugin does

PBJ License Manager runs on the site you sell from and acts as a license server for your own plugins and themes. It stores products and license keys, tracks which customer sites activated each key, serves update manifests to the WordPress update system, and streams plugin zips through signed, expiring download links. A key never disables a customer's plugin — it only controls whether they receive updates.

2. Requirements

3. Installation

  1. In wp-admin go to Plugins → Add New → Upload Plugin.
  2. Choose pbj-license-manager.zip and click Install Now.
  3. Activate. A "License Manager" entry appears in the admin menu.
  4. On activation the plugin creates the wp_pbj_licenses table and generates its two secrets (issue API key, download signing secret).

Settings carry over on upgrades.

4. First-time setup

Work through the tabs in this order:

Products tab. Add one product per plugin you sell.

Settings tab.

Secrets (bottom of Settings tab).

5. Daily usage

Issuing a key manually. Keys tab → Issue a key → pick product, enter buyer email and order reference, keep "Email key to buyer" checked → Issue key. The key appears in the notice and the list.

Automatic keys from PBJ Form Builder. Nothing to do once the map is set: every PAID submission on a mapped form mints a key and emails it to the submission's email field. Free submissions never mint keys.

Issuing from code. From any plugin on the same site:

do_action( 'pbj_license_issue', 'pbj-seo', 'buyer@example.com', 'order-123' );

Issuing from an external system. POST to /wp-json/pbj-license/v1/issue with header X-PBJ-LM-Key: <your API key> and body fields product, email, order_ref. The response contains the key.

Revoking / reinstating. Keys tab → search the key or buyer email → Revoke (refunds, chargebacks) or Reinstate.

Exporting. Keys tab → Export CSV.

Managing package files (Packages tab, 1.1.0+). Upload each release zip with its version number; files are stored in wp-content/uploads/pbj-license-packages/<product>/ behind a deny-all .htaccess and served only through signed expiring links. Leaving "Set as current release" ticked updates the product's package file AND latest version in one step. Old versions stay listed per product with size/date; "Make current" rolls back or forward, and Delete removes anything that isn't the current package.

Shipping a release. Packages tab → upload the new zip with "Set as current release" ticked. Done — customer sites see the update within ~6 hours (their manifest cache), or immediately after Dashboard → Updates → Check Again.

Download link in key emails (1.1.0+). The {download_url} placeholder in the key email is a signed link (default 72 hours, Settings → Email download link lifetime) to the current release of the major version the buyer purchased. Feature/minor updates are never emailed — they flow through the WordPress update system. Use "Resend email" on any key row to send a fresh copy with a fresh link.

Shipping a paid major upgrade. Do the above AND bump Current major version. Existing keys keep working installs but get manifests with reason new_major and no package; sell them a new key (a discount coupon to existing buyers works well).

6. Testing as a customer

  1. Issue yourself a key for a test product.
  2. On a second WordPress install, add your sold plugin (with the bundled client configured — see the User Guide tab) and enter the key.
  3. Set the product's Latest version higher than the installed version.
  4. On the test site: Dashboard → Updates → Check Again. The update should appear and install through the normal UI.
  5. Now revoke the key, clear the test site's cache (the client caches manifests for 6 hours — the client's flush_cache() runs when the key is re-saved), and confirm the update still shows but the download link is gone.

7. Upgrading

Upload the new pbj-license-manager.zip via Plugins → Add New → Upload Plugin and choose "Replace current with uploaded". Settings, products, and all license data survive. Once the plugin's own update channel is live at pbj.tech, updates arrive through the normal WordPress update UI instead.

8. Troubleshooting

9. Where things live