More fixes

WordPress menu not saving: items disappear after Save Menu

You add pages to a big menu, click Save Menu, and the last items are gone, or new items will not stay. There is no error message. The usual cause is a PHP setting called max_input_vars: PHP accepts only so many form fields per save (1,000 by default), every menu item sends about a dozen, so a menu of roughly 80 items or more is cut off at the end without a word. Here is how to confirm it and fix it.

What the owner sees

example-bakery.com/wp-admin/nav-menus.php

What the checks found


  

Is it the input limit? (five minutes)

  1. Count the menu. Small menus (under about 60 items) almost never hit the limit. A shop or mega menu with 80 to 150 items is the classic case.
  2. Look at which items vanish. If the items lost are always the ones at the bottom of the list and the top ones save fine, the save was cut off at the field limit. Random items losing their settings points to a plugin or a cache instead.
  3. Read the limit. Go to Tools, Site Health, Info, Server. "PHP max input variables" shows the number. 1000 is the default and is too low for a big menu.
  4. Same symptom elsewhere? WooCommerce variations that will not save, or a theme options page that "forgets" settings, often hit the same limit on the same site.

Fix it, safest first

  1. Ask the host to raise it. One line to support: "Please set PHP max_input_vars to 3000 for my site." Most hosts do it the same day, and many control panels (cPanel's MultiPHP INI Editor, Plesk's PHP settings) have it as a field you can change yourself.
  2. Or set it yourself in a PHP settings file. Add max_input_vars = 3000 to php.ini, or to a .user.ini file in the site's main folder on hosts that run PHP-FPM or CGI. On Apache with mod_php, php_value max_input_vars 3000 in .htaccess works instead (on other setups that line causes a 500 error, so remove it if the site breaks).
  3. Check it took. Reload Site Health, Info, Server. A .user.ini change can take up to five minutes to be read.
  4. Re-add the missing items and save once. The dropped items were never saved; add them again and click Save Menu.
  5. If the setting cannot be changed today: edit the menu in Appearance, Customize, Menus, which often saves a big menu the Menus screen cannot, or split one huge menu into a main menu plus a footer or category menu.

What you see, what it means, what it needs

What you seeWhat it meansUsual fix
Last menu items disappear after Save Menu, no errorSave cut off at PHP's max_input_varsRaise max_input_vars to 3000, re-add the items
New menu items will not stay; old ones are fineMenu already at the field limitSame: raise the limit
WooCommerce variations or theme options not savingSame limit on a big formRaise max_input_vars
Changes save but the live menu looks oldA page cache is serving the old menuClear the cache; see changes not showing
Save Menu shows "Are you sure you want to do this?"The page sat open too long or a security check failedSee are you sure you want to do this
500 error right after editing .htaccessphp_value is not allowed on this serverRemove the line; use .user.ini or the host's PHP settings

What not to do

Most cases are one line from the host's support team. If you cannot reach the PHP settings or the menu still drops items after the change, that is what the box below is for. Related: changes not showing, mobile menu not working, are you sure you want to do this.