Skip to content

Uninstall behaviour

The plugin ships an uninstall.php that runs when the plugin is deleted from Plugins > Installed Plugins (not just deactivated). By default, uninstall is destructive — it removes everything the plugin created.

  • {prefix}bp_profile_views is dropped.
Option Notes
bp_profile_views_general_options Main settings array.
bp_profile_views_db_version Schema version flag.
bp_profile_views_visitor_setting_seeded One-time seed flag written on first activation.
edd_wbcom_BPPV_license_key EDD license key.
edd_wbcom_BPPV_license_status EDD license status.
edd_wbcom_BPPV_license_expires EDD license expiry date.
bp_profile_views_admin_welcome_options Legacy 1.4.x stub (never held data).
bp_profile_views_members_options Legacy 1.4.x stub (never held data).
bp_profile_views_support_options Legacy 1.4.x stub (never held data).

On multisite installs, each option is deleted from both the sub-site and the network (delete_option + delete_site_option).

  • bp_profile_views_referer_transient
  • bp_profile_visit
  • edd_wbcom_BPPV_license_key_data
  • visitor_setting — per-member tracking opt-out flag.
  • bp_profile_views_user_login_session — per-member session dedupe array.

All rows in {prefix}bp_notifications where component_name = 'bp_profile_view_notifications' are deleted. The table is checked for existence before the delete runs, so the uninstall is safe even if BuddyPress is no longer active.

Add this to wp-config.php before running uninstall:

define( 'BPV_KEEP_DATA_ON_UNINSTALL', true );

When the constant is true, uninstall.php exits immediately without touching any data. The custom table, settings, user meta, transients, and notifications are all preserved.

  • Migrating between environments — uninstall and reinstall on the new environment without losing the view log.
  • Temporarily disabling the plugin — keep historical data so you can re-enable later.
  • Replacing with a fork — preserve data while swapping the plugin code.

If you uninstalled with the keep-data constant and later want to remove the data by hand:

Terminal window
# Drop the custom table
wp db query "DROP TABLE IF EXISTS \`$(wp db prefix)bp_profile_views\`;"
# Delete options
wp option delete bp_profile_views_general_options
wp option delete bp_profile_views_db_version
wp option delete bp_profile_views_visitor_setting_seeded
wp option delete edd_wbcom_BPPV_license_key
wp option delete edd_wbcom_BPPV_license_status
wp option delete edd_wbcom_BPPV_license_expires
wp option delete bp_profile_views_admin_welcome_options
wp option delete bp_profile_views_members_options
wp option delete bp_profile_views_support_options
# Delete transients
wp transient delete bp_profile_views_referer_transient
wp transient delete bp_profile_visit
wp transient delete edd_wbcom_BPPV_license_key_data
# Bulk-delete user meta
wp db query "DELETE FROM \`$(wp db prefix)usermeta\` WHERE meta_key IN ('visitor_setting','bp_profile_views_user_login_session');"
# Bulk-delete notifications
wp db query "DELETE FROM \`$(wp db prefix)bp_notifications\` WHERE component_name = 'bp_profile_view_notifications';"

No. Deactivating the plugin from Plugins > Installed Plugins is a no-op for data. The capture pipeline stops firing and the admin menu disappears, but the table, options, user meta, and transients stay intact. Reactivating restores normal operation without any data loss.

Only deleting the plugin (using the “Delete” link on the Plugins screen) runs uninstall.php.