Warning
This action is irreversible. Once you delete the data, it cannot be restored. Proceed with caution.
To completely remove WP Statistics along with all its data, you can use the following methods:
Method 1 – Remove Data by Using Available Options
You can use the standard WordPress tools to remove WP Statistics. However, simply removing the plugin will not delete the statistical data or settings from the database completely.
To remove tables, data, and settings:
- Navigate to Statistics → Optimization → Data Cleanup.
- Use the available options to clear data.
Data Cleanup Options
- Delete Records Older Than: Removes user stats older than a specified number of days.
- Remove Visitors Exceeding: Deletes user stats for visitors exceeding a specified daily view limit.
- Remove User IDs: Permanently deletes all stored user IDs to anonymize user visit records.
- Clear User Agent Strings: Permanently erases all user agent strings from the database.
- Clean Up Recorded Query Parameters: Removes previously stored query parameters from historical data.
Remove Certain User Agent Types
- Choose Agents to Delete: Select and delete specific user agents from the database. All associated data will be permanently removed.
- Choose Operating Systems to Delete: Select and delete specific platforms from the database. All associated data will be permanently removed.
- Erase Data for Specific IP: Input and delete all data associated with a particular IP address. All associated data will be permanently removed.
After performing the data cleanup, you can disable or delete the plugin from the WordPress plugins page.
Method 2 – Delete Data by a Query
WP Statistics stores its data in specific tables. To delete these tables:
- Run the following query to remove WP Statistics tables:
DROP TABLE IF EXISTS wp_statistics_*
- To delete the plugin’s options, run the following query:
DELETE FROM wp_options WHERE option_name LIKE '%statistics%'
Important:
Ensure that the plugin is disabled before deleting any tables to avoid potential conflicts.
By following these methods, you can ensure that WP Statistics and all its data are thoroughly removed from your WordPress site.