Uninstallation

LicenceForge distinguishes between deactivation and uninstallation. Understanding the difference is important before removing the plugin from your WordPress site.

Deactivation vs. Uninstallation

These are two separate operations with very different consequences.

Operation What Happens Data Preserved
Deactivation Plugin code is disabled; scheduled tasks are removed and rewrite rules flushed Yes -- all tables, options, and transients remain intact
Uninstallation Plugin files are deleted; data is optionally removed based on a configuration flag Depends on the wplf_delete_data_on_uninstall option

Deactivation

Deactivating LicenceForge through Plugins > Installed Plugins > Deactivate performs the following cleanup:

Cron Events Removed

All four scheduled WP-Cron events are unregistered:

  • wplf_daily_maintenance
  • wplf_check_expiring_licenses
  • wplf_cleanup_analytics
  • wplf_webhook_retry

Rewrite Rules Flushed

WordPress rewrite rules are flushed to remove any custom endpoints registered by LicenceForge.

Data Preserved

All database tables, options, and transients created by LicenceForge remain in the database. This means you can safely deactivate and reactivate the plugin without losing any data. License keys, products, activations, audit logs, and all other records are retained.

Note

Deactivation is safe and reversible. If you need to temporarily disable LicenceForge (for example, during troubleshooting), deactivation is the appropriate choice.

Uninstallation

Uninstallation occurs when you delete the plugin through Plugins > Delete or via WP-CLI. The behaviour depends on the wplf_delete_data_on_uninstall option.

Data Deletion Flag

By default, the wplf_delete_data_on_uninstall option is set to false. This means that deleting the plugin will remove only the plugin files -- all data remains in the database.

To enable full data removal on uninstall, set this option to true before deleting the plugin:

update_option( 'wplf_delete_data_on_uninstall', true );

Alternatively, this setting can be toggled in the LicenceForge admin under Licences > Settings > Advanced.

What Gets Deleted

When wplf_delete_data_on_uninstall is true and the plugin is deleted, the following data is permanently removed:

Database Tables Dropped

All eight custom tables are dropped:

  1. wplf_products
  2. wplf_product_prices
  3. wplf_licenses
  4. wplf_activations
  5. wplf_webhook_events
  6. wplf_audit_log
  7. wplf_analytics
  8. wplf_api_keys

Options Deleted

All WordPress options matching the wplf_* prefix are deleted from the wp_options table. This includes configuration settings, encryption secrets, and the database version tracker.

Transients Deleted

All transients matching _transient_wplf_* and _transient_timeout_wplf_* are removed from the database.

Danger

Data deletion is irreversible. Once the plugin is deleted with wplf_delete_data_on_uninstall enabled, all license keys, products, activations, analytics, audit logs, API keys, and configuration data are permanently destroyed. There is no recovery mechanism. Export your data before proceeding.

Recommended Procedure

If you intend to fully uninstall LicenceForge and remove all data, follow these steps:

  1. Export your data. Use the built-in CSV export under Licences > Tools > Export to back up your licenses, products, and activations.
  2. Create a database backup. Use your hosting provider's backup tool or a plugin like UpdraftPlus to create a full database backup.
  3. Enable data deletion. Navigate to Licences > Settings > Advanced and enable the "Delete all data on uninstall" option, or run:
    update_option( 'wplf_delete_data_on_uninstall', true );
  4. Deactivate the plugin. Go to Plugins > Installed Plugins and click Deactivate.
  5. Delete the plugin. Click Delete to remove the plugin files and trigger data cleanup.

Tip

If you are uninstalling only to reinstall a fresh copy (for example, to resolve a corrupted installation), you can leave wplf_delete_data_on_uninstall set to false. Your data will persist through the reinstallation.