Limited Number of Menu in WordPress

August 30, 2014 2.2k views

I'm having limited number of menu issue in my WordPress. I'm having about 100 menu + sub menus on my page. In my previous hosting, I don't have this limited issue. After I reached about 80 menus, I couldn't create more.

I've Google on this issue and found many suggestions and I have tried the following.

  1. Edit /etc/php5/apache2/php.ini by changing max_input_vars from 1000 to 5000. Restart apache

  2. Create a new php.ini and put in wp-admin folder.

Change max_input_vars = 3000 
upload_max_filesize = 70M; 
post_max_size = 128M; 
upload_tmp_dir = 70M; 
max_input_vars = 3000; 
memory_limit = 256M;
  1. edit .httaccess by adding
<IfModule mod_php5.c> 
php_value max_input_vars 5000 

None of them works.

I also found a suggestion that it's the limit that can only be adjusted by hosting. However, I have already asked the support team, but they said they can't help on this setting.

This's very important since I really need to have a lot of items on my menu. Really appreciate anyone help.

Note - I'm using WordPress App image from Digital Ocean on Linux 14.04 Apache server.

Thank you,

6 Answers

When you see people stating that it can only be adjusted by the hosting company, they are on a shared hosting account and do not have full root access to their server. On DigitalOcean, you are able to configure your server as you see fit.

When you changed the max_input_vars setting, were the changes reflected in the output og phpinfo() ?

Check out this blog post for more information on the problem you're facing.

I am having this same problem, can't seem to find a fix anywhere. Somewhere on the server, the server is overriding maxinputvars = 3000 back to the default 1000.

I have also changed all the settings in php.ini // .htaccess // suhosin without any luck. The limit stays at 1000.

Any thoughts? I have read that article entirely and it does not have an answer for me

I'm having this issue as well. Tried above solutions and searched for answers with no luck.

Having same issue with no resolution.

FYI : It seems that the problem was ignorance. So I thought I would share.

In the PHP.ini file if something has a semi-colon at the start then it is text. To actually make the change you must remove the semi-colon

Of the below lines, line one is inactive while line two is active. It should be noted that by default the php.ini file has maxinputvars as inactive. Once I removed the semi-colon and change the variable. All I needed to do was power off the VPS and turn it back on. This resolved the issue for me.

; max_input_vars = 3000     
max_input_vars = 3000

Change max input vars by uploading php.ini in wp-admin, this way seemed to work for me How to Increase the Menu Items Limit In WordPress

Have another answer? Share your knowledge.