Skip to content

How to Fix the Custom Menu Items Limit in WordPress

These are only a few of the benefits of a well-crafted menu, so we understand the frustration when things don’t go your way. Hopefully this article will help smooth over any issues that you may have expanding your menu limit in WordPress.

Go big or go home

Research in the psychology of user behavior shows that users want to feel in control when navigating a website, which means that you shouldn’t crowd any one page with too much information—especially not in your homepage. Nor should you offer endless amounts of scrolling. Put the control back in the users’ hands by decluttering individual pages and making everything the viewers need very apparent. This can be easily done with an organized mega menu.

 

 

Remember that different people want to browse in different ways and it’s up to you to give them those options – with tabs, drop-down menus and filtered options. You can have broader categories listed but in some cases, it might be good to give people more specific drop-down options. For example, instead of just having a “Woman’s Apparel” tab, include refined options such as “Sweaters”, “Shirts”, “Bottoms”, “Shoes”, etc.

Depending on the size of your company, this may lead to a large number of menu items on your site, causing you to face a particular WordPress problem: exceeding the limit of allowed menu items.

Although it’s not recommended to create custom menus in WordPress that are excessively long (keep usability in mind), some companies have large demands that need to be accounted for in the menu. The issue often becomes that once you start adding lots of items to your menu, you can’t even get to the limit (about 100 menu items), and your growth is stunted.

But when this limit of menu items occurs before the limit of 100 menu items it is often related to a problem in the server settings.

Let’s try to understand why this issue happens.

Explanation of The Problem with Custom Menu Items Limit in WordPress

This problem is neither caused by your Jupiter theme, nor by WordPress. The limit is not fixed for all and it differs depending on the the environment details. You’ll know when you’ve reached the menu item limit. If you don’t get a notification, you’ll start noticing strange behaviour with your menus:

  • Menus become untagged from their theme locations.
  • Menus lose their hierarchy.
  • It becomes impossible to add new items to your menu.

The number of menu items is limited by web server, which will obviously differ from person to person. The problem is related to a server setting called max_input_vars. You may have seen notifications regarding the max_input_vars before. It is described as “How many GET/POST/COOKIE input variables may be accepted”. The default value is 1000.

Each item in your menu accounts for roughly 11 “inputs”. 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.

How to check the limit on your server

To check the value of max_input_vars function on your server, you can use the plugin WordPress phpinfo() . Install it in WordPress Dashboard > Plugins > Add new

 

 

and go to Settings > WordPress phpinfo(). Search for ‘max_input_vars’. You’ll see the default value of your server.

 

 

How to Increase the Limit of Custom Menu Items 

There are two ways to fix the variables to enable a larger number of items to be saved. In most cases, one of these fixes should remove the menu item limit.

1) Editing the .htaccess file.

The first method you could try is to edit the .htaccess file which is stored in the home directory of your WordPress installation. You’ll have to connect to your FTP account using some FTP client like FileZilla. Once you connected, open .htaccess file and add the following code snippet:

php_value max_input_vars 5000

From here you can increase the max_input_vars limit from 1000 to 5000, which will allow your menu items limit in WordPress to increase automatically. You can also try to increase the value from 5000 to 7000 or more if the limitations persist, however – another reason they may persist is because the PHP server is not responding to your code entry, and in that case you could try to use the solution number two.

2)  Editing PHP.INI file.

Editing the Php.ini file is the same thing as with the .htaccess. You need to locate your PHP.ini file on your server via FTP and add the following lines of code:

suhosin.post.max_vars = 5000
suhosin.request.max_vars = 5000

or this:

max_input_vars = 5000

and restart the server if necessary.

Things to keep in mind

After making any of the changes mentioned above, it is important to check the phpinfo() plugin page again to ensure your change has been applied.

If you don’t have access to the php.ini file, you can alternatively contact your hosting provider support and ask them to edit it to your needs.

 

[call_to_action title=”Have your custom WordPress project done by Artbees experts for competitive price.” target=”_blank” url=”https://themes.artbees.net/pages/artbees-care-wordpress-customisation-services/?utm_source=customization-related-docs-posts” type=”link”]

 

So, this problem is not as big and troublesome as it may seem at first. The good news is that it can be easily fixed. I hope this article gave you some good knowledge regarding max_input_vars function so that you can avoid any menu limit frustration and add as many items as your designer soul desires.

 

 

 

Create Your
Dream Website with

Stay in the Loop

Sign up for our newsletter and stay up-to-date on the
latest WordPress trends, insights, and resources.

By entering your email, you agree to our Privacy policy and Terms of Services.

Share

Tatyana Hutsol

Tatyana Hutsol

Tatyana is a cherished member of the Artbees Support Team and has a close familiarity and expertise with WordPress Themes. First starting her career in hosting support services, since then Tatyana has been working with creation and functionality in WordPress platforms and themes.

No comment yet, add your voice below!


Add a Comment

Your email address will not be published. Required fields are marked *

×
Black Friday WordPress Deals - Artbees

Enjoy 50% OFF Artbees products, and partner deals!

Ends Tue 3 Dec 12:59pm (UTC)