Deleting Categories

Deleting Categories — What Actually Happens

Understanding what happens when you delete a category is critical. Deletion triggers a cascade of permanent data loss across multiple systems.


The Deletion Cascade

When you delete a category, the following happens immediately and irreversibly:

What's Affected What Happens
The category itself Soft-deleted (marked as deleted in the database)
All subcategories Recursively soft-deleted — the entire subtree is removed
Product-to-category assignments Permanently deleted (CASCADE DELETE on the junction table). Products are NOT deleted, but they lose their assignment to this category.
Brand exclusions Permanently deleted. Any brand exclusion rules you configured for this category are gone.
Landing page images Permanently deleted. Custom category images you uploaded are removed.
Landing page sort orders Permanently deleted. Custom sorting you configured is removed.

What Is NOT Deleted

  • The products themselves are not deleted — they still exist in the system
  • Product data (pricing, inventory, etc.) is unaffected
  • Products assigned to other categories retain those other assignments

The Real Problem: Orphaned Products

When a category is deleted, every product that was only assigned to that category (and no other) becomes an orphaned product — it has no category assignment. Orphaned products:

  • Do not appear in any category browsing page on the webstore
  • May not appear in search results correctly
  • Have no breadcrumb navigation on their product detail page
  • Will have an empty WebstoreCategory   field in the search index

Why You Should Not Delete All Categories

This is the most important section of this guide.


When you delete all categories with the intention of creating your own from scratch, the following chain of problems occurs:


1. All Product Assignments Are Destroyed

Every product on the webstore loses its category assignment. With thousands of products and no category links, you effectively have an uncategorized store. Products exist but customers cannot browse to them through category navigation.


2. The Automatic Category Rebuild Has Limits

While the Catalog Management Worker will attempt to recreate categories on its next scheduled run (based on published catalog data), this process:

  • Only works for aftermarket catalog products — OEM and Private Label products do not get automatic category assignments
  • Only creates categories that match the published catalog's category paths — Custom category names you created will not be recreated
  • Rebuilds from scratch with no memory of customizations — All brand exclusions, landing page images, sort order overrides, and manual recategorizations are permanently gone
  • Takes time — The worker runs on a schedule, not instantly. The store may be in a broken state for hours

3. Custom Categories Don't Automatically Get Products

If you create brand-new categories with custom names that don't match the published catalog's category paths, the system has no way to automatically assign products to them. You would need to manually assign every product — which is impractical at scale.


4. The Landing Page Breaks

The webstore landing page displays top-level categories with images and product counts. With no categories, the landing page has nothing to display. It may show an empty page or redirect to a blank category view.


Hide vs. Delete — Which Should I Use?

I want to... Use
Temporarily remove a category from my webstore Hide Category
Remove a section while I reorganize it Hide Category
Keep a category for seasonal use but hide it off-season Hide Category
Prevent customers from seeing a category under construction Hide Category
Remove a category I'm certain I will never need again Delete Category (with caution)
Start fresh and create my own custom categories Do NOT delete all categories

The Rule of Thumb

When in doubt, hide it. Hiding preserves everything and is instantly reversible. Deleting triggers cascading data loss that cannot be undone.

Still need help? Contact Us Contact Us