# WordPress plugin uninstall cleanup script generator

> Source: https://ththeme.net/wordpress-plugin-uninstall-cleanup/ | Updated: 2026-12-05 | License (data): CC BY 4.0

Across **862 activated WordPress.org plugins** on WordPress 7.1.5, **162 plugins** leave custom database tables behind after default deletion (many intentionally preserve user data unless an opt-in wipe toggle is enabled). Select uninstalled plugins below to generate a **backup-first WP-CLI Bash script and pure SQL checklist** with destructive lines commented out by default and shared Action Scheduler tables automatically skipped.

## Key facts
- Covers 1,007 custom wp_* tables, 347 WP-Cron hooks, and 2,867 option keys
- Automatically detects and skips shared actionscheduler_* tables used by WooCommerce, WPForms and Rank Math
- Supports any custom $table_prefix (validated locally; zero database credentials required)
- Every DROP TABLE and DELETE line ships commented out so running accidentally performs backup + dry-run only
- 1-click Download .sh, Copy SQL (phpMyAdmin), and Copy Markdown checklist

## Uninstall table cleanup summary across 1,000 tested plugins (December 5, 2026)

| Category | Plugins | Share of table creators |
| --- | --- | --- |
| Total plugins executed in PHP 8.4 lab | 1,000 | 862 activated cleanly |
| Plugins leaving >=1 orphan table after default uninstall | 162 | 76.1% |
| Plugins dropping 100% of their tables cleanly | 51 | 23.9% |
| Largest single-plugin table count observed | Booking for Appointments and Events Calendar - Amelia (66) | Default uninstall without opt-in wipe |

## Build your backup-first cleanup script

Select one or more plugins you have already deactivated and deleted, enter your site database prefix, and download or copy the safe dry-run script.

Loading cleanup generator...

Enable JavaScript to assemble custom cleanup scripts, or inspect [wp-database-tables.csv](https://ththeme.net/data/wp-database-tables.csv).

## Plugins with the most leftover tables after default uninstall

Retaining tables by default protects against accidental data loss during updates or reinstalls. Always check a plugin settings screen for an official uninstall wipe toggle before running manual SQL.

(Full interactive table at https://ththeme.net/wordpress-plugin-uninstall-cleanup/ | CSV: https://ththeme.net/data/wp-plugins-top1000.csv & https://ththeme.net/data/wp-themes-top1000.csv)

## Safety checklist before dropping any table

- **Check plugin status:** verify the plugin is deactivated and deleted (`wp plugin list`) across every multisite sub-site.
- **Export a verified backup:** confirm your `wp db export` file is non-empty and downloadable outside `public_html`.
- **Watch shared libraries:** never drop `actionscheduler_actions`, `actionscheduler_claims`, `actionscheduler_groups`, or `actionscheduler_logs` while WooCommerce, WPForms, Rank Math, WP Mail SMTP, or All in One SEO remain installed.
- **Check the 12 core tables:** never modify WordPress core tables (`posts`, `postmeta`, `options`, `users`, `usermeta`, `comments`, `commentmeta`, `terms`, `termmeta`, `term_taxonomy`, `term_relationships`, `links`).

**Cite in GitHub / Reddit / docs (CC BY 4.0):**
`[WordPress Plugin Uninstall Cleanup Script Generator](https://ththeme.net/wordpress-plugin-uninstall-cleanup/) (THTheme, 2026-12-05, CC BY 4.0)`

## FAQ

### Why do reputable plugins like WooCommerce and Wordfence leave tables behind?

Major plugins intentionally retain orders, subscribers, or firewall logs when deleted so an admin troubleshooting a conflict does not wipe years of business records. Many offer an opt-in delete-all-data constant or checkbox.

### Will running the downloaded .sh script immediately delete tables?

No. Every DROP TABLE, wp cron event delete, and wp option delete line is commented out by default. Running it as downloaded only checks plugin status, exports a SQL backup, and prints matching table sizes.

### What if a plugin created additional tables after setup wizard steps?

Our WASM lab measures clean activation and default homepage execution. If you enabled paid add-ons or wizards, inspect unknown tables with our /wordpress-database-tables/ bulk SHOW TABLES classifier first.

## Sources
- [WordPress Plugin Handbook: Uninstall Methods](https://developer.wordpress.org/plugins/plugin-basics/uninstall-methods/)
- [Action Scheduler Library Documentation](https://actionscheduler.org/)
- [WP-CLI wp db export reference](https://developer.wordpress.org/cli/commands/db/export/)
