Preventing My Plugin From Being Used For Free

The short answer is that you can’t force people to register a plugin. Because it’s written in PHP, anyone with a modicum of PHP knowledge can get into the code and bypass any checks you put in there.

That being said, there are three routes you can take to monetize it:

  1. Move some of the critical functionality to an external server. Users have to register to use the external service. However if you make your plugin totally reliant on the external service, you may run into issues with wordpress.org if you want to list your plugin there.

  2. Have two versions of your plugin: a free version that has basic functionality and a paid version (coupled with a licensing system) that offers more features, better support and automatic updates. If you do this, you’ll need to make sure the free version has enough features to be useful in its own right and that the paid version has enough extra features to be worth buying. This has the advantage that you can list your free plugin on wordpress.org and have (discreet) upsells in it for your paid version.

  3. Charge for it up front and live with the inevitable pirating that will occur.