So I had a request to add a super big menu in WordPress, and some sub menu’s and then after configuring the menu and clicking save half my menu disappeared. Apparently there is a limit that is set.
This limit is not imposed by WordPress but by your web hosting server because of some security reasons. In PHP, there is a thing called post vars that controls menu items. By default maximum post vars are much limited as most of the websites require only a few menu items.
All you need to do is adding a piece of code in your php.ini file. Keep in mind that different web hosts support different kind of methods and we have listed all here;
To increase input_vars add the following code in your php.ini file
max_input_vars = 3000;
If your hosting server has Suhosin running, it will affect your WordPress menu limit and you need to add the following code in your php.ini file;
suhosin.post.max_vars = 5000
suhosin.request.max_vars = 5000
Other methods
If above given workarounds don’t work, you can also try some other;
Create a php.ini file with the below given code and put it into wp-admin folder
max_input_vars = 3000;
This is the one that worked for me!
Create a file .user.ini and add the following code to it and try placing it in WordPress root or in wp-admin folder;
max_input_vars = 5000;
Hopefully one of the method should work for you.
Credits to:
http://webcusp.com/solved-how-to-increase-wordpress-menu-items-limit/
Read more at:
The WordPress Menu Item Limit or: Help! Half my menu items just disappeared!
No tweets found from "ahmedv"