A WordPress plugin license and subscription system needs three pieces working together: a license key tied to an activation record, not just a code that passes or fails a check, a REST endpoint the premium plugin code actually calls to validate and refresh that record, and an update server that is completely separate from WordPress.org. Skip the third piece and you are not just breaking a best practice, you are violating a directory guideline that gets plugins pulled.
We ran into all three of these while building EEAT WP Pro, a plugin that helps WordPress sites strengthen their E-E-A-T signals for SEO. The client had a half-formed idea and needed it turned into a real product: a free version on WordPress.org, a premium tier with its own subscription logic, and a license system that actually held up once real customers started paying for it. It shipped in four weeks. This post is the architecture behind that, not the business-model decisions around what goes in the free tier versus the paid one. If you are still deciding where that line sits, we covered that question separately. This one is about the plumbing.
Why You Cannot Just Bolt This Onto WooCommerce
The instinct a lot of WordPress developers have is to reach for WooCommerce Subscriptions, since it already handles recurring billing, or to sell license keys as products the way a WooCommerce store selling someone else’s software keys would. Both are solving a different problem. WooCommerce Subscriptions tracks whether a customer’s order is in good standing inside your own store. It has no idea whether the plugin you sold them is actually activated, on which domain, or whether that domain still exists.
What you actually need is closer to a device-activation system than a billing record. A customer buys a license. That license then gets activated on a specific WordPress install, which is a separate event from the purchase and can happen days, months, or never. The plugin running on that install needs a way to ask, on its own schedule, “is this activation still valid,” independent of whatever your store thinks the payment status is. Those are two different systems talking to each other, not one system doing double duty.
Part 1: The License Key Is Not the Lock
A common first mistake is treating the license key itself as the thing being checked, a string the plugin validates against a hash or a remote lookup and nothing else. That works until a customer shares the key with a friend, or activates it on a staging site and a production site and a local dev copy, all at once, with nothing stopping them.
The key should point to an activation record, not act as the credential on its own. When a site activates, the plugin sends the key plus the site’s domain to your server. Your server creates a row: this key, this domain, activated on this date. A second domain trying to activate the same key either gets rejected outright or counted against an activation limit you set per license tier, say one site for a basic plan and five for an agency plan. Deactivating from inside the plugin’s settings frees up that slot. This is the same pattern Easy Digital Downloads’ Software Licensing extension and Freemius both use under the hood, and it exists because it closes the sharing problem that a bare key check leaves wide open.
Part 2: A REST Endpoint, Called on a Schedule, Not Every Page Load
The plugin needs to ask your license server “are we still good” without doing it on every single page request, which would mean every visitor to the customer’s site waits on an external HTTP call before the page finishes loading. Register a REST route on your license server, something like /wp-json/yourplugin-licensing/v1/validate, and have the premium plugin call it from a WP-Cron event, once a day is typical, not from init or anything that runs on every load.
Store the result in a transient with a lifespan longer than the check interval, so if the cron run gets missed, or your license server has a bad five minutes, the plugin keeps working off the last known-good answer instead of locking a paying customer out over a blip on your end. This single decision, caching the last valid state instead of failing closed on every connectivity hiccup, is the difference between a license system customers tolerate and one that generates support tickets every time your server has a rough night.
Part 3: The Update Server Cannot Be WordPress.org
This is the part that is not optional. WordPress.org’s plugin directory guidelines explicitly prohibit “serving updates or otherwise installing plugins, themes, or add-ons from servers other than WordPress.org’s,” and that includes installing a premium version of a plugin that shares an identity with a free one already in the directory. In practice this means your free “lite” plugin and your premium add-on have to be two separate plugins, with the premium one distributed entirely outside WordPress.org, usually from your own site.
Mechanically, you hook pre_set_site_transient_update_plugins and plugins_api on the premium plugin to inject version and download information pulled from your own server, gated by a valid license check, instead of letting WordPress’s normal update flow reach out to the .org API for that plugin slug at all. The free plugin on WordPress.org stays completely untouched by any of this. It updates through the directory like every other free plugin, because it has to.
Staying Inside WordPress.org’s Actual Rules
If any part of your plugin lives on WordPress.org, the directory’s detailed guidelines are not a style suggestion, they are the terms your free plugin is distributed under, and a few of them bite hard if you are not careful. Guideline 5 bars functionality that exists in the code but is “restricted or locked, only to be made available by payment or upgrade,” which rules out shipping premium features dormant inside the free plugin and unlocking them with a key, even though that pattern is common outside the WordPress ecosystem. Guideline 6 goes further and says a license-validation service serves no purpose, and is therefore not allowed, when all the functionality it is gating is already included locally in the plugin. Guideline 7 prohibits a plugin from contacting external servers at all without explicit, documented consent, so if your free version pings anything, that has to be opt-in and disclosed, not silent. The cleanest way to avoid all three at once is to keep every bit of license-checking logic entirely inside the premium add-on, which lives off WordPress.org and is not bound by its rules in the same way, and leave the free plugin with zero network calls related to licensing. Guideline 11 also caps how pushy you can be about the upgrade itself: prompts have to be sparing, dismissible, and confined to the plugin’s own screens, not injected into the dashboard at large.
Handling a Payment That Fails
A webhook from Stripe or PayPal telling you a renewal failed is not the same event as “this customer should lose access right now.” Webhooks arrive late, arrive twice, or occasionally do not arrive at all, and treating the first failure notice as a hard lock punishes customers for your infrastructure’s bad moments as much as their own non-payment.
| Approach | What it does | Where it breaks down |
|---|---|---|
| Hard lock on first failed-charge webhook | Premium features disable the moment one failure event arrives | Punishes customers for delayed, duplicate, or out-of-order webhook delivery, not only real non-payment |
| Fixed grace period, around 5 to 7 days | Features stay active through a reminder window before locking, checked on a schedule independent of the webhook | Needs its own cron check, since a confirming second webhook is not guaranteed to show up at all |
| Feature degrade instead of a full lock | Core plugin functionality keeps running; only the premium-only pieces turn off | Only works if the plugin was built with a real standalone free-tier state from the start, not added after the fact |
We leaned toward the grace-period approach on EEAT WP Pro: the custom admin dashboard built for license tracking shows status clearly enough that a customer, or our own support, can see a lapsed renewal coming before it turns into a locked plugin.
What This Actually Looked Like in Practice
EEAT WP Pro needed to display author details with schema-rich markup, add trust badges and credential links, and do all of that across a free public release and a separate monetized tier, built in four weeks. The free version shipped to WordPress.org on its own, with no licensing code inside it at all. The premium tier runs the license and subscription logic described above: activation records bound to a domain, a daily validation check cached in a transient, and an update channel that never touches the .org API for that plugin. The client’s own words after the build: “Took my half-baked requirements and offered really solid suggestions to turn the idea into a working tool.” That is usually what a license system you do not have to think about again looks like from the customer side, invisible until something actually needs to happen.
If you are building a plugin ecosystem of your own and want this architecture handled correctly the first time, including the WordPress.org compliance details that are easy to miss, our plugin development team has shipped this pattern repeatedly, and you can see more of that work across our WordPress plugin portfolio.
FAQ
Can I just use Easy Digital Downloads’ Software Licensing or a similar plugin instead of building this from scratch?
Yes, and for most single-product sellers that is the right call. EDD’s Software Licensing extension, Freemius, and similar tools handle activation records, update gating, and renewal syncing out of the box. Building a custom system only pays off when you need behavior those tools do not support, like a licensing model tied to a larger platform, or when you are already running your own payment infrastructure and do not want a second system bolted on top of it.
Does the free version of a plugin need to phone home at all?
No, and in most cases it should not. WordPress.org’s guidelines require explicit, documented consent before a plugin contacts an external server, so the simplest compliant design keeps the free plugin’s code entirely self-contained. Save any license or activation checks for the separate premium add-on, which is not distributed through the directory and is not bound by the same rule.
What should happen if a customer’s site cannot reach the license server when it is due to revalidate?
The plugin should keep working off the last valid response stored in its transient rather than failing closed. A single missed check, caused by your server, their host, or a flaky connection, should never be the thing that disables a paying customer’s site. Reserve the actual lock for a sustained failure, not a one-off.
How many site activations should one license key allow?
That is a pricing decision more than a technical one, but one activation for a basic tier and a higher fixed number, often five, for an agency or business tier is the standard pattern across most licensing plugins. Whatever number you pick, make deactivation easy to find inside the plugin’s own settings page, so a customer moving a license from an old site to a new one does not need to contact support to free up the slot.
Can WordPress.org reject a plugin just for having an upgrade prompt?
Not for having one, but it can reject or remove a plugin for how that prompt behaves. Guideline 11 requires upgrade notices to be limited in scope, dismissible, and confined to the plugin’s own admin screens rather than injected into the general WordPress dashboard. A single, dismissible notice on your plugin’s settings page is fine. A persistent dashboard widget pushing the premium tier is the kind of thing that gets flagged.
Sources
WordPress.org’s Detailed Plugin Guidelines, specifically guidelines 5 through 8 and 11, covering trialware, license-validation services, external server contact, and upgrade-prompt placement.


