Half of my menu disappeared while adding a new item

It is not a theme or WordPress issue. It’s a server configuration issue that silently cuts your menu items down before WordPress even knows about them.

 

The server configuration is limiting the number of POST variables that can be submitted to the server; we need to increase that.

 

There are two ways this limit may be imposed

 

1. PHP’s max_input_vars

The increasingly common issue is the max_input_vars PHP directive. By default, it is set to 1000. To increase this, simply set it in php.ini. I’d suggest 3000 to be safe, but 2000 should be sufficient for most sites. max_input_vars = 3000 How do you edit php.ini? That depends on your host. If you have access to the php.ini file, simply add or edit the directive, save, and restart Apache. If you’re with a web host that doesn’t give you access (common with shared hosting), you may have to contact your host and have them make the change for you.

 

2. Suhosin

Prior to PHP’s max_input_vars, the Suhosin PHP Security module introduced a similar pair of max_vars directives that are identical in purpose. Not all servers run Suhosin, but those that do will need to increase the following directives in php.ini: suhosin.post.max_vars = 3000 suhosin.request.max_vars = 3000 Again, you may need to contact your host to get them to make these changes if you don’t know how or can’t do it yourself.

 

Restarting Apache with the new maximum POST variable values should allow you to submit all of your menu item variables and therefore save new menu items. Hoorah!

 

More information about this issue can be found in this manual.