I’m not sure if its well known, but we found few articles about this topic – If you are using WordPress and have like bunch of navigation menus, there is a big chance, that your will run to the limit, where you cannot add any more navigation items. Actually, your WordPress navigation menu items might be lost after save, out of the blue sky.
On the left image, you could see one WordPress menu item. This one particular item contains a lot of input fields. You can see 6 of them (url, title, etc…), but there are as well another 6 hidden inputs. So together it’s 12 input fields for 1 wordpress menu item. When you hit the save button, your web browser will process this form and send it to the server. And in this step happens the vanishing magic.
Every modern PHP server has setting called “max_input_vars”. It’s a number and default value is usually 1000. This setting means, that your PHP/Apache server will accept only first 1000 variables sent from the client. The rest is simply ignored. This setting is relatively new, it was introduced in PHP version 5.3.9, which was released at january 2012. It has been incorporated into the PHP to avoid DDoS (denial of service) attacks, which will simply sent huge amount of PHP Post variables and then flood the server. This is the reason, why your WordPress menu items are disappearing! Count with me, one of your WP Menu Item consume 12 POST variables (6 visible + 6 hidden inputs). Theoretically, you could do the math like 1000 / 12 = 83 menu items. But WordPress is also occupying few other POST variables, so this mean that you could save safely like 70 – 80 menu items.
So after you cross the magical border, and add more than 80 items, they won’t save. You will be confused, because some of your WordPress menu items simply get ignored by the PHP server and wont be saved at all. Worse situation is, if you purchased some template from themeforest, which comes with demo content. You simply install huge load of menu items and everything appears to be ok. After while, you go to your WordPress Admin -> Appearance -> Menu, and hit the save button. Bam! half of yuor menu items are gone
Basically you have 2 options here:
A.) Open your PHP.ini file, search for “max_num_vars” and try to enlarge the value from 1000 to 3000 for example. But not every time you have access to the PHP.ini
B.) Use our WordPress Menu Item Limit Fix plugin. It’s no hustle – you simply activate the plugin and thats it