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.
What gets removed by default
Section titled “What gets removed by default”Custom table
Section titled “Custom table”{prefix}bp_profile_viewsis dropped.
Options
Section titled “Options”| 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).
Transients
Section titled “Transients”bp_profile_views_referer_transientbp_profile_visitedd_wbcom_BPPV_license_key_data
User meta (all users)
Section titled “User meta (all users)”visitor_setting— per-member tracking opt-out flag.bp_profile_views_user_login_session— per-member session dedupe array.
BuddyPress notifications
Section titled “BuddyPress notifications”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.
Keeping data on uninstall
Section titled “Keeping data on uninstall”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.
When to use this
Section titled “When to use this”- 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.
Manual cleanup
Section titled “Manual cleanup”If you uninstalled with the keep-data constant and later want to remove the data by hand:
# Drop the custom tablewp db query "DROP TABLE IF EXISTS \`$(wp db prefix)bp_profile_views\`;"
# Delete optionswp option delete bp_profile_views_general_optionswp option delete bp_profile_views_db_versionwp option delete bp_profile_views_visitor_setting_seededwp option delete edd_wbcom_BPPV_license_keywp option delete edd_wbcom_BPPV_license_statuswp option delete edd_wbcom_BPPV_license_expireswp option delete bp_profile_views_admin_welcome_optionswp option delete bp_profile_views_members_optionswp option delete bp_profile_views_support_options
# Delete transientswp transient delete bp_profile_views_referer_transientwp transient delete bp_profile_visitwp transient delete edd_wbcom_BPPV_license_key_data
# Bulk-delete user metawp db query "DELETE FROM \`$(wp db prefix)usermeta\` WHERE meta_key IN ('visitor_setting','bp_profile_views_user_login_session');"
# Bulk-delete notificationswp db query "DELETE FROM \`$(wp db prefix)bp_notifications\` WHERE component_name = 'bp_profile_view_notifications';"Does deactivation delete anything?
Section titled “Does deactivation delete anything?”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.
Where to next
Section titled “Where to next”- Database schema — what each storage location holds.
- Hooks and filters — extension surface.

