Can You Undelete a WordPress Category? Here’s the Answer!

It usually happens during a cleanup session. You’re tidying up a bloated category list, click delete on what you think is an unused category, and only afterward realize a dozen published posts were sitting in it. The panic that follows is understandable, but the actual damage is smaller than it feels in the moment. Here’s what’s true: WordPress has no native undo button for a deleted category, but nothing you published gets destroyed in the process.
This walks through exactly what deleting a category does behind the scenes, the real recovery options depending on whether you have a backup, and how to set things up so this particular mistake doesn’t cost you anything next time.
What Actually Happens When You Delete a Category
WordPress categories are stored as taxonomy terms in the database, separately from the posts they’re attached to. Deleting a category removes that term record, but it doesn’t touch the posts themselves. Three specific things happen:
- Posts survive, but get reassigned. Every post that was filed under the deleted category automatically falls back to your site’s default category, which is “Uncategorized” unless you’ve changed it in Settings.
- URLs can break. If your permalink structure includes the category slug (a common setup, like
/category-name/post-title/), every post that was in that category now resolves to a different URL, which means old links and search engine listings pointing to the original URL return a 404 unless you set up a redirect. - Category metadata is gone for good. The description, custom fields, and any SEO settings tied specifically to that category’s archive page (if you were using Yoast, RankMath, or a similar plugin) disappear along with the term itself.
Can You Actually Undelete It?
No, not directly. Once a category term is deleted from the wp_terms and wp_term_taxonomy tables, WordPress doesn’t keep a trash bin for it the way it does for posts and pages. There’s no “Restore” link waiting in a hidden view. That said, “can’t undelete” and “the situation is unrecoverable” are two different things – you have three real paths forward, and which one applies depends on whether you have a recent backup.
Method 1: Recreate the Category and Reassign Posts
This is the fastest fix when you don’t have a backup handy, and it works fine for most situations since the posts themselves were never actually deleted.
Step 1: Recreate the category
- Go to Posts → Categories in your WordPress dashboard.
- Under “Add New Category,” enter the same name the deleted category had, along with the same slug if you remember it – matching the slug matters if you want old URLs to have any chance of resolving correctly again.
- Set the parent category if the original was nested under another one, then click Add New Category.
This gives you a fresh term with a new term ID, which is worth knowing if you’re troubleshooting anything downstream – it isn’t literally the same database row as before, just a new one with the same name.
Step 2: Reassign the affected posts
- Go to Posts → All Posts.
- Filter the list by “Uncategorized,” since that’s almost certainly where your posts landed after the deletion.
- Select the posts that belong in the recreated category (check publish dates if you’re unsure which ones were affected).
- Choose Edit from the bulk actions dropdown and click Apply.
- In the bulk editor, assign the new category and click Update.
This restores the post-to-category relationships. The one thing it doesn’t restore automatically is the original category description or custom SEO fields – you’ll need to re-enter those manually if they mattered.
Method 2: Restore From a Backup
If you run regular backups, this is the cleanest option, since it brings back the category exactly as it was, description and all, without any manual reassignment.
- Locate your most recent backup from before the deletion – check your backup plugin’s dashboard (UpdraftPlus, BackupBuddy, and Duplicator all keep a version history) or your hosting provider’s backup panel.
- Follow your backup tool’s restore process. Some tools let you restore just the database rather than the entire site, which is faster and lower-risk if you don’t want to touch your media files or plugin versions.
- Once restored, check Posts → Categories to confirm the category and its posts are back.
The tradeoff: anything published or changed after that backup was taken gets rolled back too, unless your restore tool supports a selective, database-only restore. Check what changed since the backup date before committing to a full restore.
Method 3: Recover Directly From the Database
For anyone comfortable with phpMyAdmin or a database client, and only relevant if your host keeps automatic database snapshots separate from your backup plugin, it’s sometimes possible to pull the deleted term’s data from a database-level snapshot even without a full-site backup. This requires checking the wp_terms, wp_term_taxonomy, and wp_term_relationships tables in the snapshot and manually reinserting the relevant rows, or exporting them and importing through a migration tool.
This is not a beginner-friendly path, and it’s easy to corrupt term relationships if the term IDs don’t match what’s referenced elsewhere in the live database. If you’re not confident running raw SQL against a production database, Method 1 is the safer route even though it requires more manual reassignment work.
Whichever method you use, test the fix on a staging copy of the site first if one is available. Running an untested database change directly against a production site multiplies the risk of a small mistake turning into a bigger one, and a staging environment costs nothing but a few extra minutes to catch a problem before it reaches live visitors.
Using WP-CLI for Faster Bulk Reassignment
If you’re comfortable with the command line and managing a site with hundreds of affected posts, reassigning categories through the dashboard’s bulk editor gets slow fast. WP-CLI’s wp post term set command handles this in bulk far more efficiently, letting you script a reassignment across a large list of post IDs in one pass rather than clicking through the dashboard repeatedly.
This is really only worth setting up if you’re dealing with a large-scale reassignment – for a handful of posts, the dashboard’s bulk editor is faster in practice since there’s no command syntax to look up. For a site with thousands of posts affected by a taxonomy restructuring gone wrong, though, WP-CLI turns a multi-hour dashboard slog into a script that runs in minutes.
Fixing Broken URLs After Recreating a Category
If your permalinks included the category slug and the recreated category doesn’t perfectly match the original URL structure, set up 301 redirects from the old category URL to the new one rather than leaving visitors and search engines to hit a 404. Most SEO plugins (Yoast, RankMath, All in One SEO) include a redirect manager for exactly this scenario, or a dedicated plugin like Redirection handles it just as well. Skipping this step means losing whatever search ranking that category archive page had built up, since search engines treat a 404 as a dead end rather than automatically associating it with the new page.
What About Deleted Tags, Not Just Categories?
Everything above applies almost identically to tags, with one meaningful difference: tags don’t have a fallback default the way categories do. Delete a category and your posts land safely in “Uncategorized.” Delete a tag and the posts simply lose that tag association entirely, with nothing filling the gap. If you’re recovering a deleted tag rather than a category, recreate it the same way through Posts → Tags, then reassign posts through the same bulk-edit process described above.
This distinction matters more than it seems at first glance if your site relies on tags for related-post widgets or an archive page that some visitors bookmark directly. A missing tag doesn’t throw an error anywhere obvious – the related content section just quietly gets thinner, which is easy to miss until someone points it out.
What Happens to Child Categories
Deleting a parent category doesn’t delete its child categories along with it. WordPress promotes the child categories up one level in the hierarchy instead, effectively making them top-level categories rather than removing them. This can catch admins off guard on a site with a deep category structure, since a single accidental deletion can quietly reshuffle your entire taxonomy hierarchy, not just remove one term.
If your site depends on a specific parent-child structure for navigation menus or breadcrumb trails, check the full hierarchy after any category deletion, not just the immediate posts affected. A menu item pointing to what used to be a child category might now be pointing to a top-level one with a different URL structure, depending on your permalink settings.
Why Regular Backups Make This a Non-Issue
Every recovery method above gets faster and cleaner the more recent and complete your backup is. A few practical setups worth having in place:
- A scheduled backup plugin. UpdraftPlus, BackupBuddy, and Duplicator all support automated daily or weekly backups stored off-site in Google Drive, Dropbox, or Amazon S3, which protects you even if your hosting account itself has an issue.
- Host-level backups as a second layer. Providers like SiteGround, Bluehost, and WP Engine include automatic daily backups on most plans – worth confirming this is actually enabled rather than assuming it by default.
- A manual export before big taxonomy changes. Before any bulk category reorganization, a quick manual database export through cPanel or an FTP-based file backup takes a few minutes and gives you a clean rollback point specifically for that change.
When It’s a Multisite Network, Not a Single Site
On a WordPress multisite network, category deletion behaves the same at the individual site level, but it’s worth checking whether the category was shared across multiple sites through a taxonomy-sharing plugin before assuming the fix is isolated to one site. Network admins occasionally forget that a “delete on one site” action can ripple into other sites sharing the same taxonomy setup, and the recovery steps above need to be applied to every affected site individually rather than just the one where the deletion was performed.
Better Habits Than Deleting Categories Outright
A few adjustments prevent this exact problem from recurring:
- Merge instead of delete. If two categories are covering overlapping ground, a term-merging tool moves all the posts from one into the other in a single action, rather than orphaning them into Uncategorized the way a straight deletion does.
- Set a meaningful default category. Go to Settings → Writing and change the default category from “Uncategorized” to something more useful, so an accidental category deletion doesn’t dump posts into a generic bucket that’s easy to overlook.
- Audit your category list periodically. A quarterly pass through Posts → Categories, checking post counts per category, catches near-empty or redundant categories before they pile up into a confusing list that invites a rushed cleanup session in the first place.
Frequently Asked Questions
Will recreating a category with the same name restore its old term ID?
No. WordPress assigns a new, unique term ID to the recreated category, even if the name and slug are identical. This generally doesn’t matter for day-to-day use, but it can matter if another plugin or custom code specifically referenced the old term ID.
Does deleting a category affect the posts’ SEO rankings?
Indirectly, yes, if the category archive page itself had search ranking and inbound links, and if the resulting URL changes for individual posts aren’t redirected properly. The posts’ own content and rankings aren’t directly affected, but broken links pointing to changed URLs will hurt if left unaddressed.
Can I recover a deleted category without any backup at all?
Yes, using Method 1 above – recreating the category and manually reassigning posts. You’ll lose the original category description and any custom SEO metadata specific to that category, but the posts and their content are fully recoverable.
Is there a plugin that adds an undo feature for category deletion?
Not a dedicated one that reliably restores full category data after the fact. The more reliable approach is preventing the loss in the first place – a decent backup plugin functions as your undo button for this and most other accidental-deletion scenarios.
What happens to a category page’s search engine ranking after deletion?
If the category archive page had built up organic traffic and backlinks, deleting it and leaving a 404 in its place loses that ranking equity. Setting up a 301 redirect to the recreated category page as quickly as possible preserves most of that value, since search engines generally treat a prompt redirect as continuity rather than a dead page.
Does this same recovery process work for custom taxonomies, not just categories and tags?
Yes, the underlying mechanism is identical, since categories and tags are themselves just built-in custom taxonomies. A deleted term from any custom taxonomy (product categories in WooCommerce, for instance) follows the same recreate-and-reassign logic described here.
Will a caching plugin show the old category page after I fix things?
Possibly, for a short window. If your site uses page caching, clear the cache for the affected URLs after recreating the category and reassigning posts, otherwise visitors and search engine crawlers may see a stale cached 404 page even after the underlying fix is complete.
Restricting Who Can Delete Categories in the First Place
On multi-author sites, the simplest long-term fix is often limiting who actually has the ability to delete taxonomy terms rather than relying on everyone being careful. WordPress’s default role capabilities give Editors full rein over categories by default, which is generous on a site with several contributors who don’t need that level of access. A role-management plugin can restrict category deletion specifically to Administrators, leaving Editors and Authors free to create and assign categories without the ability to remove them entirely.
This single change prevents the vast majority of accidental deletions on team-run sites, since it removes the possibility rather than relying on training or careful clicking. It’s a five-minute setup that pays for itself the first time it prevents exactly the kind of mistake this article is about.
The Bottom Line
WordPress doesn’t offer a direct undelete for categories, but the practical impact of that gap is smaller than it feels in the moment. Your posts survive the deletion regardless, and recreating the category plus reassigning posts gets you back to a working state within a few minutes for most sites. A recent backup makes the whole process faster and cleaner, restoring category descriptions and metadata along with everything else, which is reason enough to double-check your backup setup is actually running rather than assuming it is.
The larger lesson worth taking from an incident like this isn’t really about categories specifically. It’s a reminder to check, right now, whether your backup solution is actually configured and running rather than something you set up once years ago and never verified. A five-minute check today is a lot cheaper than finding out the hard way, mid-recovery, that the backups stopped running months ago without anyone noticing.
Interesting Reads:
Learn How to Add Coupons on WordPress Products Easily

