Family Encyclopedia >> Electronics

How to Resolve WordPress Custom Menu Item Limits: Proven Server Fix

Recently, one of our users encountered a frustrating issue: hitting an unexpected limit on custom menu items in WordPress. Any items added beyond this limit simply wouldn't save. As experienced WordPress developers, we replicated the problem on our local setup—creating over 200 items and even nesting 100 in a dropdown—without issue. This pointed to a server-side restriction, confirmed by numerous reports and Trac ticket #14134.

While WordPress core doesn't impose menu limits, certain server configurations do. The culprit is often Suhosin, a security extension that caps POST variables. We've guided many users through this fix successfully. Here's how to resolve it.

If you have root access on a VPS or dedicated server, edit your php.ini file directly. For shared hosting, contact your provider to apply these settings:

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

One user, "ronnieg," shared success with a menu exceeding 450 items for a large real estate site (unverified by us but widely echoed).

Why This Happens

Limits vary by host—some report 16 items, others 50—due to Suhosin's POST variable restrictions. Trac discussions confirm it's not a WordPress bug but a server limitation. Core contributor Nacin noted it as an enhancement need: WordPress must adapt to save menus efficiently across setups. It's targeted for future releases in this volunteer-driven project.

How to Resolve WordPress Custom Menu Item Limits: Proven Server Fix

We've resolved this for dozens of sites. If you've found another workaround, share in the comments to help the community—until core delivers a universal fix.