Wordpress is a dynamic content management system, and as such it can be used to handle websites with just a few pages, and also websites with thousands of pages such as the New York Times. However as WordPress themes progress, and menus start to handle more and more options – I am seeing more and more people run into an issue where they cannot add any more data to their menu. You add all of your custom menu and sub-menu items. You give them fancy icons, and apply custom classes to them – and then WordPress simply doesn’t save it.
First off, let us understand why this happens. Most people experiencing a non-saving WordPress menu will find themselves on a shared hosting platform, one where various security measures have been put in place which limit certain things – such as the amount of post variables that the server can accept. And here-in lies our problem; our server has a limited number of variables which it can accept.
So How Do I Fix This Already?!
First off – you can try by setting your own limits via a custom php.ini file. Shared hosting accounts may place this file in their root folder, while VPS and dedicated server users should just update their original php.ini file.
Simply add the following lines to your php.ini file:
max_input_vars = 4500
Servers running suhosin will want to also add:
suhosin.post.max_vars = 3000 suhosin.request.max_vars = 3000
Those of you who are on a VPS or Dedicated server, and have access to WHM, can handle this all much easier. Load up WHM, go to Service Configuration -> PHP Configuration Editor, find max_input_vars and change the settings.
If that doesn’t work you still have another option. Most hosting companies are pretty down to earth people, and if you just ask them to raise the limits a bit – you’ll be pleasantly surprised. So go ahead and make a new support ticket with your hosting company, and if need be – reference this post so they know the issues you are having and just how quickly and easily they can fix them.
If after all this you still find yourself running out of space in your WordPress menu – leave a comment or shoot me a message. I will be glad to help you out.