• Starting some time today, site admin has been giving me Bad Request errors (‘Your browser sent a request that this server could not understand’) when saving my menu.

    I know that it started some time today, because at about 10:45, I succesfully saved the menu after adding a new page. And a minute later, saving the menu again after adding another new page generated the error.

    And now the error appears whenever I try to save the menu. Even without changes, or after actually removing a menu item. So I can’t even save the menu that succesfully saved mere hours ago.

    To emphasize: This is not just without anything having changed in my setup, but actually within minutes after the same thing worked perfectly.

    I’ve cleared browser cache to no avail.

    I’ve tried without plugins, still the same problem.

    The problem leaves no trail in my server error logs, nor in debug.log when I enable wp-debug.

    What’s wrong here, and how do I get around it?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @florismk ,

    I ran into the same problem on one of my website last week while modifying the dropdown menu items and it was a large menu with upto 67+ items. Switching to a default theme Twenty Twenty-Five let me save the menu again, so a theme issue is worth ruling out. I’d suggest temporarily activate a default latest theme and try saving the menu. If it works, the problem is in your theme. Check whether updates are available for your theme and update it.

    If it still fails with the default theme, ask your hosting provider to check server-level limits. I checked your website is running on Apache server

    HTTP/2 200 
    content-security-policy: upgrade-insecure-requests;
    date: Thu, 19 Nov 2026 15:03:20 GMT
    server: Apache/2.4.71 (Unix)
    x-powered-by: PHP/8.4.27


    This Bad Request message comes from Apache, so it can be blocked before WordPress runs, which would explain why nothing appears in your logs. A security rule or the PHP max_input_vars limit, which large menus can hit, are the usual suspects.

    Thread Starter Floris

    (@florismk)

    Thanks @technifysol . I’ve contacted my provider. What I wouldn’t understand if it’s a server-level limit issue, is why saving the current menu again would fail, and even a save with a smaller payload (items removed) fails.

    Hi @florismk, the timing you describe actually points at one specific cause, and it explains why it worked at 10:45 and failed a minute later.

    Every menu item sends a batch of fields when you save, around ten or more per item, so a menu save is one big POST request. When you added those two pages, the total number of fields crossed the max_input_vars limit on the server. That is why the first save went through and the next one did not, and why it now fails even without changes: the menu is now big enough that any save sends too many fields. Removing one item may not be enough to get back under the limit.

    The reason nothing shows in your error log is that Apache rejects the request before WordPress ever runs, so WordPress has nothing to log. The same applies to ModSecurity: if a rule is blocking the request, the hit is usually in the ModSecurity audit log, not the regular error log, so ask your host to check that log for entries on /wp-admin/nav-menus.php around the time you save.

    Here is how I would confirm it, in order:

    1. Check the current limit in Tools > Site Health > Info > Server, and look for the max_input_vars value. The default is 1000, and a menu with roughly 90 or more items can pass that. You can also ask your host for the value if Site Health does not show it.
    2. Raise max_input_vars to 3000 or 5000. Depending on the host, that is done in php.ini, in a .user.ini file in the site root, or with php_value max_input_vars 3000 in .htaccess. Note that php_value lines in .htaccess do nothing on hosts running PHP-FPM, so if that does not work, use .user.ini or ask the host to raise it.
    3. If the limit is already high, ask the host to check the ModSecurity audit log and the Apache error log for the exact time of a failed save, and whether any request size limit like LimitRequestBody is in place.

    A quick workaround while you wait is to split the menu into a smaller one, but the real fix is the limit above. Let us know what max_input_vars is set to and whether raising it clears the error.

    Good point @florismk . If a smaller save fails too, it’s probably not about size. It’s more likely a firewall ModSecurity rule blocking something in the menu data, or a recent change on the server, which could explain why it worked minutes earlier.

    When your hosting provider replies, ask them to check the Apache error log and ModSecurity log for the time of a failed save. That should show exactly what’s rejecting the request.

    It’s also worth trying a private/incognito window, in case cookies are causing the 400 error.

    Thread Starter Floris

    (@florismk)

    Thanks, @elitekamrul. The limit is set to 4,000, and the payload seems to add up to some 1,250, so that should not be the issue. (Also because the same menu I saved this morning won’t save this afternoon.) Unfortunately, it’s shared hosting, so I don’t have access to php.ini or other server-level configuration.

    @technifysol I’m asking for those logs, thanks. The same problem occurs InPrivate, and also in a different browser, so I’m afraid there’s nothing I can do on my end.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.