You want to charge for a WordPress plugin. The catch: if you distribute the free version on WordPress.org, you cannot ship paid code in it or lock features behind a payment — the directory forbids "trialware." So how do you sell a Pro tier without getting your plugin pulled? The answer is a clean two-part architecture, and it is simpler than it sounds.

The rule you must not break

The plugin hosted on WordPress.org may contain only free, fully-functional code. No disabled paid features, no "upgrade to unlock" gates on code that ships in the free download. Violate this and your plugin gets rejected or removed. Everyone selling a Pro tier works around it the same way.

The compliant pattern: free plugin + separate Pro add-on

  • The free plugin (on wp.org) contains the free features plus a gate and "Get Pro" links — but no paid code. The gate is just a filter: if ( apply_filters( 'myplugin_is_pro', false ) ) { /* register paid hooks */ }.
  • The Pro add-on is a separate plugin you sell on your own store (Gumroad, Freemius, Lemon Squeezy). It is never uploaded to wp.org. When installed and licensed, it answers that filter with true and registers the paid features on hooks the free plugin already exposes.

Because the paid code lives only in the add-on the buyer downloads from you, the wp.org copy stays 100% free and compliant. See the full freemium architecture for how the two pieces fit together.

Verifying the license key

The Pro add-on needs to confirm the buyer actually paid. The lightest approach: your store issues a license key per sale, and the add-on verifies it against the store’s API. Gumroad, for example, exposes a license-verification endpoint — the add-on POSTs the product ID and the key, gets back whether it’s valid (and not refunded), and stores the result. Cache the check so you are not calling the API on every page load, and re-check periodically.

Whatever store you pick, keep one store as the license authority so you are not reconciling two key formats. The buyer pastes their key once; the add-on flips myplugin_is_pro to true; every gated feature lights up.

Don’t build the gate twice

The license gate, the settings framework, the readme format, and the build-to-zip script are the same for every freemium plugin you ship. The feature is the only part that changes. Build the plumbing once (or start from a kit that already has it), and each new plugin becomes "add the feature, ship it" instead of a week of boilerplate.

Skip building the license plumbing

The Freemium WordPress Plugin Boilerplate ships this exact license gate already wired — a Pro filter, a settings framework, a wp.org-ready readme, and a one-command scaffolder. Add your feature and ship, instead of rebuilding the gate for every plugin.

See the boilerplate →

Related reading: how to build a freemium WordPress plugin (and actually sell the Pro version).