Tenant License Key Activation

Managing plugin license keys efficiently in a multi-tenant WordPress environment is crucial. The automation of license key activations can differ based on the licensing model of the plugin used.

Automating License Key Activation

  1. Separate Premium Plugin:

    • When a premium plan is offered as a separate plugin, having the plugin in the version is sufficient.
    • Examples: Rank Math, All in One Migration.
  2. Generic License Key:

    • For plugins using a generic license key for unlimited or seated license plans, ensure the license keys are included in the Version before creating a snapshot.
    • This approach guarantees that the license keys are present in the Tenant's database upon provisioning.
  3. Seated License Key with Different Activation Keys:

    • If a plugin uses a seated license model with different activation keys for each seat, custom code might be necessary.
    • This typically involves a must-use plugin that runs PHP in combination with lifecycle hooks.
  4. PHP Constants for License Activation:

    • PHP Constants can be defined at the Version level.
    • This method allows for the automatic loading of license keys into tenants, simplifying the process significantly.

Process Flow for License Key Activation

  1. Determining License Key Storage:

    • License keys can be stored in wp-config.php or the database.
    • The method of activation differs based on the storage location.
  2. Using PHP Constants in the Tenant Overview:

    • For license keys stored in wp-config.php, manually define them as PHP constants in the tenant overview.
    • Constants should include the 'NAME' and 'KEY', e.g., define ('ACF_PRO_LICENSE', 'your_license_key');.
  3. Activating Database-Stored License Keys:

    • For plugins storing license keys in the database, use the Tenant Lifecycle Hooks to trigger a PHP snippet.
    • The Code Snippets plugin can be used for storing and activating these keys.
  4. Leveraging Lifecycle Hooks:

    • Utilize Tenant Lifecycle Hooks like wpcs_tenant_created to automate the activation of license keys stored in the database.
    • This approach is ideal for plugins where license keys can be activated directly from the plugin's overview.
  5. Creating Snapshots with Pre-Activated Plugins:

    • Ensure that when creating snapshots, all necessary plugins and their license keys are activated and configured.
    • New tenants created from these snapshots will inherit these configurations, automating license key activation.


Automating the activation of plugin license keys in Wildcloud's multi-tenant WordPress environment is a crucial aspect of efficient WaaS management. By understanding the different methods and utilizing wildcloud's PHP Constants and Lifecycle Hooks, administrators can streamline this process, ensuring smooth operations across all tenants.