SunLicenseSign in
For premium WordPress plugin and theme authors

Your Pro WordPress plugin, licensed per site.

Free on wordpress.org, Pro licensed per site, refunds switched off.

Create free account

Free plan · No credit card · Set up in minutes

Coding with an AI agent? Paste one prompt
  • WordPress
  • WooCommerce
  • PHP
  • Envato
  • Lemon Squeezy
  • Payhip
  • Stripe
What you get

Built for how you sell.

Site limits that hold

Domain as machine id: 1, 5, 25 sites.

TOO_MANY_MACHINES

Sell where you like

WooCommerce, Lemon Squeezy, Payhip and Envato.

Buyers move sites

Staging to live, freed in your portal.

Lite & Standard

Pro downloads, gated

Revoked or expired keys can't download.

Standard

Sentinel spots shared keys

And refunded licenses still in use.

Lite & Standard

PHP SDK, any host

No dependencies: cURL or PHP streams.

PHP 8.0+
How it works

Live before your next release.

  1. 1Create a free account
  2. 2Connect WooCommerce or Envato
  3. 3Check it in Pro settings
acme-forms-pro/includes/license.php
use SunLicense\SunLicenseClient;

function acme_pro_license_ok(): bool {
    $cached = get_transient('acme_pro_license');
    if ($cached !== false) return $cached === 'ok';

    $client = new SunLicenseClient('https://api.sunlicense.com', token: 'slk_...');
    $result = $client->validate(get_option('acme_pro_key'), [
        'host' => wp_parse_url(home_url(), PHP_URL_HOST), // one site = one activation
    ]);

    set_transient('acme_pro_license', $result->isValid() ? 'ok' : 'no', DAY_IN_SECONDS);
    return $result->isValid();
}
FAQ

Questions, answered.

Can a plugin on wordpress.org check a license key?

No. wordpress.org's guidelines ban trialware, so a plugin hosted there can't lock features behind a license key. Keep the free plugin fully working there and sell Pro as a separate add-on plugin through WooCommerce, Lemon Squeezy, Payhip or Envato. Only the Pro add-on checks the key, and its readme should say it connects to SunLicense.

How does a per-site license limit work?

Your Pro add-on sends the site's domain as the machine fingerprint. Each new domain takes a slot on the license, and once all slots are used the check answers TOO_MANY_MACHINES. Buyers free a slot in your customer portal when they move a site, or you free it from the dashboard.

My plugin is GPL. What does a license key protect?

The GPL lets anyone share and modify your code, and a license key doesn't change that. What a key controls is what you provide: downloads of new releases, support, and any service your plugin calls on your servers. Refunded, revoked and over-the-limit keys stop working for all of that.

Does SunLicense deliver plugin updates into wp-admin?

Not by itself: there's no WordPress update server built in. On Standard, buyers download each Pro release from your customer portal, and only active licenses can. If you run your own update checker, it can call the same license check before offering an update.

Protect your next release.

  • Free plan
  • No credit card
  • Cancel any time