Family Encyclopedia >> Electronics

How to fix custom menu item limit in WordPress

Just a few days ago, one of our users reported an unusual problem. The problem was that he was reaching the limit of custom menu items. Anything you save after reaching the menu item limit will not be saved at all. We had never heard of this issue, so we decided to try it out at our local install. I created over 200 menu items and saved them. Worked fine. Moved 100 items in a dropdown menu and saved perfectly fine. At the time, we knew this had something to do with the server. Upon further investigation, it seemed that many others had the same problem. Digging a little deeper, we found a trac ticket (#14134) that highlighted this issue. After reading the very long trac ticket, it seems that the problem has not been fixed yet, but there is a workaround for those who have this problem. In this article, we will show you how to fix custom menu item limit in WordPress.

To fix the problem, you need to edit your PHP.ini file. If you're on a dedicated server or VPS with root access, then you should already know what we're talking about. If you're on shared hosting or don't know where the PHP.ini file is, ask your web host to do it for you.

You should ask them to set the following values ​​in the PHP.ini configuration: = 5000 suhosin.request.max_vars = 5000 

Another user "ronnieg" posted a job he has for his great real estate site and menu (450+ pages and growing). You can read his reply to follow along. (Note:we haven't tested this)

Explanation of the problem

This issue is not entirely WordPress based as different people are seeing different limits (some say 16 others say 50 and as you know we hit 200 without seeing any limits). In theory, WordPress does not limit the number of menus you can have. Your web hosting server is. There are Suhosin limitations on POST max variables, which limit the large number of entries that are saved. Nacin replied on the trac ticket to say that this is NOT a bug but rather an improvement. The core team needs to find a way around server limitations and figure out a better way to save menu items, so regardless of your server setup, you won't see any custom menu limits. Easier said than done. How to fix custom menu item limit in WordPress

WordPress is an open source (voluntary) project, and the core team does its best to improve it every day. This will be fixed, but the timeline is not defined yet as it says "Future Releases".

If you've tried something different that fixed this issue, please let us know in the comments. This will allow others to fix your problem until the core team finds a solution.