I’m running WP 3.5.1 and I’ve a menu with about 100 items. When I add new items to the menu older ones disappear.
I’m not running Suhosin or similar stuff. What can be the cause?
Note: I’m on a dedicated server.
I’m running WP 3.5.1 and I’ve a menu with about 100 items. When I add new items to the menu older ones disappear.
I’m not running Suhosin or similar stuff. What can be the cause?
Note: I’m on a dedicated server.
You must be logged in to post a comment.
The following has worked for some users with similar problem:
Try to increase the value of the
max_input_vars
variable inphp.ini
. This variable was introduced in PHP version5.3.9
and has the default value of1000
.You can read more about it in the PHP documentation:
http://php.net/manual/en/info.configuration.php
You could try to increase it to
1500
or2000
.Estimate:
Using the data below, we can try to estimate how many POST variables we are sending, given a certain number of menu items, when we press the
Save Menu
buttonIt seems to be:
which is equivalent to the line:
Then we can build the following table:
In your case, we see that if you need to save
100
menu items, you need to send1109
POST variables, so yourmax_input_vars
must be at least1109
.Similarly when we add items to the menu (via Ajax POST)
we get
which is the line:
The corresponding data table is:
When we add
10
menu items, we send103
POST variables.Data:
Just to show you the amount of
$_POST
data when I save my menu with only5
items:When I add
3
items to them menu, thePOST
data is: