The Navigation Menu Disappeared After a Theme Change
Menus are stored independently of themes, but the assignment of a menu to a display location is not. Each theme registers its own location names, so switching themes leaves the menu intact with nowhere to appear.
The short version
- The menu is not deleted. Check Appearance → Menus.
- Reassign it to the new theme’s location.
- Block themes use a Navigation block instead of menu locations.
- If the menu itself is genuinely gone, it is recoverable from a backup.
The usual fix
- Appearance → Menus
- Select your menu from the dropdown. It should still be there with all its items.
- Scroll to Menu Settings at the bottom.
- Tick the display location the new theme offers.
- Save.
That is the entire fix in most cases. The location checkboxes will have different names from your old theme, which is exactly why the assignment did not carry over.
If you are on a block theme
Block themes do not use menu locations at all. Navigation is a block placed in a template, and your classic menu is not automatically imported.
- Appearance → Editor
- Edit the Header template part.
- Select the Navigation block.
- In the block settings, choose your existing menu from the list — classic menus do appear there.
- Save the template.
If the menu is genuinely missing
Check whether it still exists in the database before assuming it is gone:
wp menu list
wp menu item list your-menu-name
If it is listed, the menu exists and only the assignment is missing. If it is not listed, it was deleted, and restoring a backup of the wp_terms, wp_term_taxonomy and wp_posts tables is the recovery path — menu items are stored as a post type.
Rebuilding quickly
If rebuilding is faster than restoring, WP-CLI makes it quick:
wp menu create "Primary"
wp menu item add-post primary 42
wp menu item add-term primary category 7
wp menu item add-custom primary "Contact" https://example.com/contact/
wp menu location assign primary primary
Stopping it happening again
- Screenshot the menu structure before any theme change.
- Note which location each menu is assigned to.
- Do theme changes on staging first, where this surfaces harmlessly.
- Export the menu with a migration plugin if it is large.
Related symptoms after a theme change
| Also missing | Why |
|---|---|
| Widgets | Widget areas are registered per theme |
| Customizer settings | Theme mods are stored per theme |
| Page templates | Templates are theme files |
| Shortcode output | Theme shortcodes stop existing |
| Header or footer layout | Rebuilt per theme |
None of these is data loss. All of them are configuration that belongs to the theme you left, which is why a theme change should always be done on staging with a checklist.
Common questions
Will the menu come back if I switch themes back?
Yes. The old theme’s location assignment is still stored and will reapply.
Can I assign one menu to several locations?
Yes, tick multiple boxes. Useful for a header and footer menu that are identical.
Why do my menu items appear as posts in the database?
Because they are. Menu items are a post type called nav_menu_item, which is why a partial restore can recover them.
Sumit
Writes everything on TechMozz.