Menu Is Not Saving or Menu Location Is Lost
If you have many menu items in your WordPress menu, you may notice that the menu is not saved after adding new elements, or that the menu loses its assigned location.
This usually happens because of a PHP server setting called max_input_vars.
Why This Happens
When you save a WordPress menu, WordPress sends all menu item data to the server in one form submission.
Each menu item can include several fields, such as title, URL, CSS classes, description, parent item, menu order, and other options.
If the menu has many items, the number of submitted fields can become higher than the server limit allowed by max_input_vars.
When this limit is reached, PHP can ignore or truncate part of the submitted data. Because of this, WordPress may not save all menu changes correctly.
Common Signs
- New menu items are not saved.
- Menu changes disappear after clicking Save Menu.
- The menu loses its assigned theme location.
- Only part of the menu is saved.
- No clear WordPress error is shown after saving.
Recommended Solution
Ask your hosting provider to increase the PHP max_input_vars value for your website.
Recommended value:
max_input_vars = 3000
For larger menus, you can ask for a higher value, such as:
max_input_vars = 5000
On very large websites with many menu items or mega menu options, an even higher value may be needed.
Message to Send to Hosting Support
Hello,
My WordPress menu is not saving correctly. When I add new menu items or assign the menu location, the changes are not saved.
Please increase the PHP max_input_vars value for my website.
Recommended value:
max_input_vars = 3000
If the menu is very large, please set it to:
max_input_vars = 5000
Please also confirm the active max_input_vars value applied to my domain.
Thank you.
Official PHP Documentation
https://www.php.net/manual/en/info.configuration.php#ini.max-input-vars
Important Notes
This is a server/PHP configuration limit. It is not a theme-specific issue.
The issue can happen with any WordPress theme when the menu contains many items and the server limit is too low.
Some hosting providers allow this value to be changed from cPanel, Plesk, php.ini, .user.ini, or hosting PHP settings. Other hosting providers must change it for you.
After the hosting provider increases the value, clear your website cache, server cache, and browser cache. Then edit the menu again and save it.
Final Recommendation
If the menu still does not save after increasing max_input_vars, ask the hosting provider to check the server error logs and confirm that the new value is active for the website domain.
You can also try reducing the number of menu items or splitting a very large menu into smaller menus if needed.