Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/aryanjasala/category-tag-trash/archive/refs/heads/main.zip![]()
Category & Tag Trash
A trash for WordPress categories, tags and custom terms. Undo a delete in one click, or restore it later with its posts, child terms and menu links.
Category & Tag Trash" width="880">
Posts and pages go to the trash when you delete them. Categories and tags don't: one click and the term is gone, its posts move to Uncategorized, its child categories move up a level and its menu links disappear. Category & Tag Trash keeps every deleted term for 30 days and puts all of that back on restore, under the same ID.
[!NOTE] Free and open source under the GPL. No pro version, no upsells, no ads in wp-admin, no tracking. And it stays that way.
Features
- Undo right after a delete, on every term screen, for single and bulk deletes
- Same ID on restore, so navigation blocks, widgets and shortcodes that store the ID work again
- Everything comes back: term meta, posts (in the same order), child terms and menu links in their menu position
- Posts that only got Uncategorized because of the delete lose it again
- Tools > Category & Tag Trash: taxonomy tabs, search, bulk restore and delete, Empty trash, and what each restore brings back
- Kept for 7, 30, 90 or 365 days, then a daily task deletes them for good
- Categories, tags, WooCommerce product categories and attributes, and any custom taxonomy with an admin screen
Install
- Download
category-tag-trash.zipfrom the latest release. - In WordPress, go to Plugins > Add New Plugin > Upload Plugin, choose the zip and activate it.
Or with WP-CLI:
wp plugin install https://github.com/aryanjasala/category-tag-trash/releases/latest/download/category-tag-trash.zip --activate
Needs WordPress 6.6+ and PHP 7.4+. To try it first, the Try in WordPress Playground badge opens a throwaway WordPress in your browser with the plugin and some demo content.
Quick look
Everything on the screen is also on WP-CLI:
wp category-tag-trash list --taxonomy=category
wp category-tag-trash restore 42
wp category-tag-trash delete --all
Screenshots
![]() Undo right after deleting a category |
Tools > Category & Tag Trash |
![]() What a restore brings back |
Documentation
| Doc | What it covers |
|---|---|
| Reference | Hooks, WP-CLI, the PHP API and what is stored |
| Development | Local setup, commands and tests |
| Contributing | Pull requests, required checks and PR titles |
| Releasing | How merged pull requests become releases |
| Security | Reporting a vulnerability |
| readme.txt | What WordPress.org shows, with the FAQ and changelog |
Project structure
category-tag-trash.php plugin header and PSR-4 autoloader
src/
├── Plugin.php creates the services
├── Snapshot.php everything about a term at the moment it was deleted
├── Snapshotter.php captures terms on pre_delete_term, saves on delete_term
├── Restorer.php puts a term, its posts, children and menu links back
├── Trash.php storage (a hidden post type) and queries
├── Purger.php daily cleanup after the retention period
├── Admin/ trash screen, list table, Undo notices
└── Cli/Command.php wp category-tag-trash
assets/ term screen script and styles
tests/
├── Unit/ PHPUnit
└── e2e/ Playwright specs and the Docker site
.wordpress-org/ screenshots
docs/ reference, development, contributing, releasing
More free plugins
Small plugins that each fill one gap in WordPress, all free with no pro version:
| Plugin | What it does | |
|---|---|---|
| Page Template Usage | See which template every page uses, and fix the pages on a missing template | |
| Staging Guard | Stops staging copies from emailing real people or getting indexed | |
| Site Read-Only Mode | Read-only mode for WordPress during migrations and deploys | |
| Restore Blocks from Revisions | Restore a single block from an old revision, not the whole post |
License
GPL-2.0-or-later © Aryan Jasala

