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.
- 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.
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
- Open your website’s .htaccess file
- Add the following line of code to the top:
php_value max_input_vars 2000
- Save your .htaccess file