A university WordPress site has a 240-item navigation menu spanning faculties, programs, services, and resources. The Appearance > Menus admin page takes 12 seconds to load, the drag-and-drop UI is unusable past 50 items, and any edit triggers a full menu re-save that locks the table for several seconds. The menu still works on the front end, but the editorial team has stopped maintaining it. This is fixable, but not with a single setting.
What’s happening
A WordPress menu is a custom taxonomy called nav_menu. Each menu item is a nav_menu_item post with metadata linking it to the target (post, page, custom URL, taxonomy term). The Appearance > Menus admin loads every menu item into a single sortable list, rendered in PHP server-side and made draggable with jQuery UI. The drag-and-drop logic was never optimized for triple-digit item counts.
On the front-end, wp_nav_menu() runs a single query for all items in the menu, then walks them recursively to build the HTML. The query is fast; the walker has reasonable performance up to a few hundred items. The bottleneck is editorial: humans cannot keep a 240-item menu organized in a flat sortable UI.
How to verify
wp menu list
wp menu item list main-nav --format=count
wp menu item list main-nav --fields=db_id,title,url,parent_id | head -20
wp db query "SELECT COUNT(*) FROM wp_posts WHERE post_type='nav_menu_item';"
wp db query "SELECT COUNT(*) FROM wp_postmeta pm JOIN wp_posts p ON pm.post_id = p.ID WHERE p.post_type='nav_menu_item';"
In the admin, open the menu, measure the time to interactive in DevTools. If it’s over 5 seconds, the editorial team is paying a daily tax.
The fix
- Break the menu into nested menus, not one flat structure. The “Custom Menu” widget and the navigation block both accept a menu name. A primary menu of 8 top-level items, each loading a sub-menu by name, scales further than one flat menu of 240 items.
- Use a structured CPT instead of menus for catalog-like navigation. University programs, product categories, faculty staff — these are content, not navigation. Build them as a custom post type with a hierarchical taxonomy and render the navigation from a
WP_Query, not fromwp_nav_menu. - Cache the menu render aggressively.
wp_nav_menu()accepts no built-in cache, but you can wrap it:if ( false === ( $html = get_transient( "nav-main" ) ) ) { ob_start(); wp_nav_menu(...); $html = ob_get_clean(); set_transient( "nav-main", $html, HOUR_IN_SECONDS ); }. Invalidate onwp_update_nav_menuaction. - Move to a block theme and the Navigation block where it fits. The Navigation block stores its tree in block markup and renders faster than the legacy
wp_nav_menu()walker on large menus. Migration is non-trivial but pays off on sites where the menu is the bottleneck. - Add an editorial governance layer. A 240-item menu got there because no one owned it. Assign menu sections to editorial owners, schedule quarterly pruning, document what is allowed. The Enterprise WordPress operating model puts navigation governance into the editorial calendar, not into the ticket backlog.
Stack Harbor’s Enterprise WordPress operating model treats navigation architecture as part of information architecture, not as a Settings page. When the menu has outgrown the admin, start the conversation.