{"id":1463,"date":"2015-05-05T20:41:11","date_gmt":"2015-05-05T19:41:11","guid":{"rendered":"https:\/\/www.megamenu.com\/?page_id=1463"},"modified":"2024-02-14T09:57:48","modified_gmt":"2024-02-14T09:57:48","slug":"menu-item-limit","status":"publish","type":"ht_kb","link":"https:\/\/www.megamenu.com\/documentation\/menu-item-limit\/","title":{"rendered":"Menu Item Limit"},"content":{"rendered":"\n<p>If you&#8217;re finding it impossible to add more items to your menu, or you&#8217;re finding that menu settings are not being correctly applied,&nbsp;then you&#8217;re probably running into the WordPress menu item limit.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>This problem is <strong>not<\/strong> directly related to Max Mega Menu <em>or<\/em> WordPress. Max Mega Menu uses a separate process to save menu item settings and does not affect the overall number of menu items you can save.<\/p>\n\n\n\n<p>You can test this for yourself by disabling Max Mega Menu and attempting to save the menu.<\/p>\n\n\n\n<p>This article may be useful to you even if you do not have Max Mega Menu installed.<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">Symptoms of the Menu Item Limit being reached<\/h3>\n\n\n\n<p>On a standard WordPress installation, on a standard server, with <strong>no plugins installed<\/strong> you will start reaching the menu item limit once you have added around 90 items in your menu. If you use menu plugins which add fields to each menu item, then the limit will be reduced (note: Max Mega Menu does not add fields to each menu item).<\/p>\n\n\n\n<p>Once you reach the menu item limit, you will start noticing strange behaviour with your menus, including:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Menus become untagged from their theme locations<\/li>\n\n\n\n<li>Menus lose their hierarchy (menu structure gets flattened)<\/li>\n\n\n\n<li>It becomes impossible to add new items to your menu<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Why it happens<\/h3>\n\n\n\n<p>The problem is <em>usually<\/em> down to a server setting called <strong>max_input_vars<\/strong>. This setting is described as &#8220;How many GET\/POST\/COOKIE input variables may be accepted [by your server]&#8221;. The default value is <strong>1000<\/strong>.<\/p>\n\n\n\n<p>Each item in your menu accounts for roughly 11 &#8220;inputs&#8221;. With a server limit of 1000 inputs, and each menu item taking up 11 inputs, this means you can save around 90 menu items before you start hitting the limit. However, if you have a plugin installed which adds fields to each menu item then the number of items you can save will be reduced.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to check the limit on your server<\/h3>\n\n\n\n<p>Go to <em>Tools &gt; Site Health &gt; Info<\/em>. Search for &#8216;PHP max input variables&#8217;.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/05\/maxinputvars.png\"><img loading=\"lazy\" decoding=\"async\" width=\"2522\" height=\"1852\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/05\/maxinputvars.png\" alt=\"\" class=\"wp-image-206689\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/05\/maxinputvars.png 2522w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/05\/maxinputvars-300x220.png 300w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/05\/maxinputvars-768x564.png 768w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/05\/maxinputvars-1024x752.png 1024w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/05\/maxinputvars-50x37.png 50w\" sizes=\"auto, (max-width: 2522px) 100vw, 2522px\" \/><\/a><\/figure>\n\n\n\n<p>1000 is the default max_input_vars value.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to increase the limit<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">cPanel<\/h4>\n\n\n\n<p>If your host gives you access to cPanel, head to the &#8220;PHP Variables Manager&#8221; page.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/05\/cpanel-php-variables-manager.png\"><img loading=\"lazy\" decoding=\"async\" width=\"666\" height=\"352\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/05\/cpanel-php-variables-manager.png\" alt=\"cpanel-php-variables-manager\" class=\"wp-image-1469\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/05\/cpanel-php-variables-manager.png 666w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/05\/cpanel-php-variables-manager-300x159.png 300w\" sizes=\"auto, (max-width: 666px) 100vw, 666px\" \/><\/a><\/figure>\n\n\n\n<p>On the next page, click the &#8216;public_html&#8217; folder and add the max_input_vars setting.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/05\/cpanel-php-variables-manager-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"872\" height=\"310\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/05\/cpanel-php-variables-manager-2.png\" alt=\"cpanel-php-variables-manager-2\" class=\"wp-image-1470\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/05\/cpanel-php-variables-manager-2.png 872w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/05\/cpanel-php-variables-manager-2-300x107.png 300w\" sizes=\"auto, (max-width: 872px) 100vw, 872px\" \/><\/a><\/figure>\n\n\n\n<p>Remember to check the Site Health page after making any changes to ensure the limit has been correctly increased.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">.htaccess<\/h4>\n\n\n\n<p>Depending on how your host has configured your server, it might be possible to change the max_input_vars value by adding the following line to your .htaccess file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">php_value max_input_vars 5000<\/pre>\n\n\n\n<p>Check the phpinfo() plugin page after making any changes to ensure the limit has been correctly increased.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">VPS and Dedicated Servers<\/h4>\n\n\n\n<p>You can adjust the max_input_vars setting in your php.ini file (make sure you restart apache\/your web server after changing any values in php.ini).<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/05\/max-input-vars-php-ini.png\"><img loading=\"lazy\" decoding=\"async\" width=\"626\" height=\"383\" src=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/05\/max-input-vars-php-ini.png\" alt=\"max-input-vars-php-ini\" class=\"wp-image-1468\" srcset=\"https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/05\/max-input-vars-php-ini.png 626w, https:\/\/www.megamenu.com\/wp-content\/uploads\/2015\/05\/max-input-vars-php-ini-300x184.png 300w\" sizes=\"auto, (max-width: 626px) 100vw, 626px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">I&#8217;ve made the change, what next?<\/h3>\n\n\n\n<p>After making any of these changes, it is <strong>important to check the site health&nbsp;page again&nbsp;<\/strong>to&nbsp;ensure your change has been applied.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">My changes aren&#8217;t being applied<\/h3>\n\n\n\n<p>If you do not have access to any of these options (or they don&#8217;t work) you will need to get in touch with your host and ask them to increase the max_input_vars setting.<\/p>\n\n\n\n<p>Please note: &#8220;max_input_vars&#8221;&nbsp;is a server configuration setting, therefore it is <strong>only<\/strong> possible to change this by reconfiguring your server. It is not possible for us to raise the limit by changing the plugin code, you must contact your host for them to adjust this server configuration option.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">My changes are applied but I still can&#8217;t save the menu<\/h3>\n\n\n\n<p>If your host has <strong>mod_security<\/strong> enabled, try disabling it (you may need to ask your host to do this for you). Alternatively ask your host to check the latest mod_security logs to see which rule is being triggered when attempting to save the menu. Then ask your host to disable that rule.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Still no luck?<\/h3>\n\n\n\n<p>You will need to contact your host and ask them to investigate.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re finding it impossible to add more items to your menu, or you&#8217;re finding that menu settings are not being correctly applied,&nbsp;then you&#8217;re probably running into the WordPress menu item limit. This problem is not directly related to Max Mega Menu or WordPress. Max Mega Menu uses a separate&#8230;<\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"open","template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"ht-kb-category":[14],"ht-kb-tag":[],"class_list":["post-1463","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-faqs"],"uagb_featured_image_src":[],"uagb_author_info":{"display_name":"Tom Hemsley","author_link":"https:\/\/www.megamenu.com\/author\/megamenu\/"},"uagb_comment_info":0,"uagb_excerpt":"If you&#8217;re finding it impossible to add more items to your menu, or you&#8217;re finding that menu settings are not being correctly applied,&nbsp;then you&#8217;re probably running into the WordPress menu item limit. This problem is not directly related to Max Mega Menu or WordPress. Max Mega Menu uses a separate...","_links":{"self":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/1463","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/comments?post=1463"}],"version-history":[{"count":14,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/1463\/revisions"}],"predecessor-version":[{"id":404249,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb\/1463\/revisions\/404249"}],"wp:attachment":[{"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/media?parent=1463"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb-category?post=1463"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.megamenu.com\/wp-json\/wp\/v2\/ht-kb-tag?post=1463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}