WordPress Menu Limit
This evening I have been working on an extensive build for a client. When I got to 47 menu items in my primary menu, I noticed any pages I added would not save. Even when I added the pages one at a time, or from different computers. This was very frustrating so I began doing my troubleshooting. The order of the menu items didn’t matter, but the number of items did. As soon as I noticed that it was 47 items, I assumed the menu.php page send the entire menu over in one process. It doesn’t add just a page or two, it adds the whole menu each and every time. This led me to believe there was a cap on how much data the page can send or the host can receive. This issue also causes problems for prestashop users as well, so listen up if this applies to you as well!
DO YOU NEED A NEW WEBSITE OR DOES YOUR WEBSITE JUST NEED AN UPDATE? USE OUR FREE WEBSITE OPTIMIZATION CHECKLIST TO FIND OUT!
👉 CLICK HERE TO GET IT NOW! 👈
I began to poke around on the web and found some information about the max_input_vars variable in your web hosts php.ini file. This sets the amount of variables the server will allow you to send it in any process. Mine was set at 1000. I wanted to change this value, increase it.
Now, the current site I am working is on a godaddy account. On bluehost and other hosts you can access you php.ini files and make edits as you need. Godaddy however does not allow this. So you have to make your own php.ini file. Here are the steps to fix this limit.
- Access your webroot via your file manager in godaddy
- create a new file and name it php5.ini
- copy and paste this single line of code into that file without the quotes “max_input_vars = 300o”
- save the changes to the file.
- go to Hosting>System Processes
- Select “End Web” Button
- Now try to save your additional menu items.
This is what worked for me. While this is a little intimidating to do at first as you may not be sure what exactly you are doing, if you delete the file your host should revert to their default php.ini. So the process is reversible and not all that scary!