WordPress

Fix WordPress menu not saving when adding new pages

If you have over 100 items in your WordPress menu and you are having difficulties adding new pages to your menu, items are disappearing or pages are converting to custom links, then it is a good chance you are running into the PHP max_input_vars limit.

Symptoms

  • You have around 100 items in your menu
  • You cannot add new menu items
  • Pages you add to your WordPress menu change to a custom link when you click Save.
  • Menu items have disappeared
  • You can create new menus and add pages normally

If you have less than 100 menu items then this article won’t fix your problem. We recommend disabling your WordPress plugins one-by-one as it’s very likely a plugin is causing the issue.

Cause

PHP limits the number of input variables to help reduce the risk of a DDOS attack on your website.

This variable limit causes issues when saving menus in WordPress with a large number of items.

How-to fix WordPress max menu item issue

  1. Open your website’s .htaccess file
  2. Add the following line of code to the top:
    php_value max_input_vars 2000
  3. Save your .htaccess file

Was this guide helpful?

Need help with this?

Open a ticket and link to this guide so our team can see what you have tried.

View support tickets

Power your business with Ecenica Hosting

Built for WordPress and serious websites. Fast, secure and supported by real people in the UK.

Ecenica hosting services represented by a connected red route across London