📝 Your Category Pages Started 404ing Right After You Restructured the Menu
A menu gets reorganized – categories nested differently, some renamed for clarity – and category archive pages that worked fine yesterday now return a 404, even though the categories themselves still exist in WordPress; menu structure and URL rewrite rules are related but separate systems, and changing one doesn’t automatically keep the other in sync.
🔎 Why This Happens
[“WordPress generates category archive URLs from REWRITE RULES that are cached and only regenerated on specific triggers – renaming a menu item, changing its nesting, or adjusting a category’s slug during a restructure can leave the OLD rewrite rules stale until something explicitly flushes them.”, “This is especially common after using a menu/category bulk-edit plugin, or after directly editing category slugs to match a new site structure – the change to the category itself is saved correctly, but the rewrite rule cache doesn’t know to regenerate just because the menu changed.”]
✅ Fix: Flush the Rewrite Rules
- The simplest fix needs no code: Settings → Permalinks → just click “Save Changes” without changing anything – this single action forces WordPress to regenerate all rewrite rules from the site’s CURRENT category/page structure, which resolves the large majority of these 404s immediately.
- If that doesn’t resolve it, check whether the category’s actual SLUG (not just its display name) changed during the restructure – a category renamed for display purposes but with an unexpectedly different resulting slug will 404 at its old URL until anything linking to it (internal links, cached pages) is updated to the new one.
⚠️ Preventing This Next Time
- Before a menu/category restructure, note down the exact URLs of pages likely to be affected – comparing before and after makes it much faster to confirm the flush actually fixed everything, rather than discovering a missed 404 later from an analytics report or a broken external link.
- If any category slugs did genuinely change, set up 301 redirects from the old URLs to the new ones – a permalink flush fixes the CURRENT structure but does nothing for old links (bookmarks, backlinks from other sites) still pointing at a slug that no longer exists.
A category still existing isn’t the same as its URL still resolving – WordPress caches the map between the two, and a restructure changes the territory without automatically redrawing the map.

