I’ve been one of the latest to run into a well-known problem with WordPress – the server-enforced limit of menu items.
So, what’s the problem?
To be honest, it’s not actually a WordPress problem. It’s an issue with the server set up that doesn’t allow WordPress to correctly send enough POST variables to set up the menu correctly if you get to many items there. Even though it’s a server-side issue, this is still a problem with the way that WordPress works. There’s around 10 individual POST variables sent for every menu item. That’s right – that many variables for each and every item. It’s crazy, but that’s how it’s worked from the start, and there’s no easy way to change it as seen in the WordPress Trac ticket for this very issue.
So what’s the answer?
It’s relatively easy, but is not as intuitive as it should be.
The answer is to set up this in your servers php.ini file:
max_input_vars = 5000
Of course, most people are running on shared servers and can’t edit the php.ini file for the whole server, so you will have to set up your own php.ini file in your sites directory structure.
The trick to this particular issue is that php.ini files don’t recurse into sub-directories, so you have to place the file in the /wp-admin/ folder for it to have the required effect.