I recently migrated a website from a dedicated server in Europe to a Shared account in the U.S. The migration went fairly smoothly – until the menus started freaking out.
WordPress Menu Symptoms:
- Couldn’t add new menu items
- Some menu items would take and others would disappear
- After saving the menu on the “Edit Menu” tab the “Menu Settings -> Theme Location” would not retain the check and on the “Manage Locations” tab the menu location would be dropped.
Cause of the WordPress Menu Malfunction:
WordPress has a limitation to the number of menu items that can be stored in a custom menu and this site had around 130 menu items.
After a little searching I came across this explanation:
“The WordPress Menu Item Limit or: Help! Half my menu items just disappeared!”
Without regurgitating the entire article; on the dedicated server the site used to be hosted on, the max_input_vars had been adjusted in the php.ini to the point where the issues were just starting to happen. On the new shared server, the hosting company doesn’t allow modification of the max_input_vars in order to provide consistent performance for all users on the shared server.
Solution To WordPress Menu Failure:
Move to a dedicated or managed server – not even remotely feasible for a small, single site and service isn’t always that great from the person leasing the dedicated or managed server; hence the migration in the first place.
Break the custom menu up into multiple menus – this is a viable option for any theme designer. Adding menu areas to a theme can be accomplished quickly with the use of widgets, filters, and templates in the theme. This could also be accomplished with plugins, but it’s better to build the theme correctly then use plugins to override the appearance and functionality of a theme.
Create a landing page for the parent item – this is the easiest solution and it’s always a good idea when your parent item has a large number of child items. What’s that mean in English?
If you have 20 child pages under a parent page or 20 sub-categories under a category, it can be incredibly difficult to use a menu to access every child item. When you create a landing page for the parent item you are providing a logical method for the website user to navigate the entire child-parent structure.
Here’s how it translates into practice:
Link the parent menu item directly to a page, post or category. Then on the page or post, manually create an outline and link to each of the child items. If using posts, you can set WordPress to display excerpts (under Settings -> Reading) and then link directly to the category.
Share Your Two Cents