WHBMP

Sell licenses for your own software

Oct 25, 2026

What you get

Sell License turns your WHBMP into a license shop for software you make. A customer orders and pays, receives a license key, and your software checks that key against your own site. You can suspend, reissue and revoke keys, and the customer can move a key to a new server.

Keys start with a prefix you choose and are signed with your own key. See License keys and your signing key.

1. Install Sell License

  1. Open Plugins > Add New and find Sell License. It is a premium plugin; the page shows how to get it.
  2. Click Install, then Activate.
  3. A License menu appears in the admin sidebar with Licenses, Software, Plugins and Plugin Categories.

The first time it is installed, your site makes a signing key pair of its own. Nothing else is needed.

2. Add your software

  1. Open License > Software and click Create.
  2. Enter the name, a slug (lowercase letters, numbers and dashes), an icon and the status.
  3. Save. Open the software to add a description, screenshots and links; these show on its public page at /software.
  4. On the Versions tab add each release with its version number, release date, notes and the package (the zip customers download).

3. Make a license product

  1. Open Products & Pricing and create a product. Choose the product type Software License.
  2. Set the price and billing cycle as for any product.
  3. Open Module Settings > License Settings and choose:
    • Key Length and Key Prefix. Keys look like ACME-XXXXX-XXXXX-XXXXX-XXXXX. With no prefix they start with LIC.
    • License Type: One Time (updates are included for the Free Update Years you set) or Monthly / Annually (the license stops working when the service is suspended or unpaid past the grace days).
    • Software Identifier: written into the signed license so your software knows what the key unlocks. Leave it blank to use the product's slug.
    • License Style: a plain license is one key for one domain. Tick License with plugins, modules or addons to unlock premium plugins with the plan (how), and Bulk license: one key for several sites to let one key work on 1, 5, unlimited sites or a number you choose (how).
    • Allow Reissue: the client can clear their own domain, IP and directory lock from the client area.
    • Allow Domain Conflict, Allow IP Conflict, Allow Directory Conflict: switch the matching check off.
    • Free Trial: refuse a second order of the product for a domain that already has one.
  4. Tick the product on the software's Pricing tab so the public page offers it.

4. Sell it

When an order is paid, the service becomes active and a key is created automatically. The client sees the key on their service in the client area, can download files you attach with Product Downloads, and can move the key to a new server (when Allow Reissue is on).

You can also issue a key by hand under License > Licenses > Create.

5. Protect your software

  1. Open License > Licenses and click Download Client. You get LicenseClient.php already set to your own site's address.
  2. Put it in your software and check the key before it runs:
require 'LicenseClient.php';

$license = new LicenseClient('THE-CUSTOMERS-KEY');

if (! $license->isValid()) {
    die('License error: ' . $license->getMessage());
}

The first check locks the key to the domain, IP address and directory it ran from (the ones you did not switch off). If one changes later, the check fails until you or the client reissue the key. The answer is cached for 12 hours, and a recent good answer keeps working for up to 72 hours if your site is unreachable, so a short outage does not lock out a paying customer.

The check itself is POST /api/license/verify on your site with license_key, domain, ip and an optional directory. It answers valid, status and message.

6. Manage keys

Under License > Licenses each key has its status, activations and an access log of every check. You can suspend, terminate or revoke it, reset its lock, regenerate the key, remove an activation, and ban a domain or IP. A suspended or unpaid subscription stops the key working at the next check.

Related

Powered by WHBMP