I have a large menu containing 10 parent items with roughly 7 child items each that I am trying to build using the WP-admin > Appearance > Menus.
I have nearly all the menu items added but now my wp-admin backend won’t save the menu, it keeps timing out and just ending on a blank screen.
I have about 4 more items left to enter but I can’t save the menu anymore.
I have tried increasing the php memory in wp-config.php by adding
define(‘WP_MEMORY_LIMIT’, ’64M’);
but it made no change.
Any tweaks or tips to help me get this menu saved, this is the only thing holding the site up and the client is waiting.
Thanks very much!
maikunari
You can always try to split your menu into 2 separate menus and then just display them next to each other in your theme. It’s far from perfect and doesn’t help a bit in understanding the root of your problem but it could help.
You can use it as temporary workaround to GTD before deadline and then dig deep into memory issues or whatever causes your trouble…
Try increasing your servers php memory limit
by either editing your php.ini
or wp-config.php using
and let us know.
I am running 3.1 as well and have searched for days trying to find a fix with no real solution. Looks like the only option is just creating two separate menus and display them next to each other in the theme.
I currently do have a 200+ menu. I set the set_time_limit (300); and define(‘WP_MEMORY_LIMIT’, ’64M’); and it does save after about 8-10 minutes. Not really the best solution. I also tried to modify the nav-menu.php file as stated above, but the directions were of no help, may be only a solution for WP 3.0…
Anyway, if anybody finds a solution that works better than this, please let me know!
i found that if you disable the pages, posts and taxonomy meta-boxes from loading in wp-admin/includes/nav_menu.php this works – as they eat up the memory because all the content of the posts is included in the source code
add // to the beginning of lines 374 & 375 (WP3.0) to disable
I was having the same problem and the memory limit setting didn’t do anything even when set to
150M
. I also tried the changes tonav-menu.php
but the line numbers don’t match, maybe because I am running WP 3.1 now.The warning I was getting was a maximum time limit error for script execution so I thought maybe it isn’t a memory issue.
So instead I set in
wp-config.php
:This seemed to fix the problem. It still takes ages for the menu to save though so I think there I think the code could be optimised so that you don’t have to use the time limit setting.
I was running into the same issue and none of the PHP fixes worked.
The problem turned out to be a semi-hidden plugin called “Endurance Page Cache” that some web hosts (including Bluehost and Hostgator) install by default.
In my case, the plugin was throwing an internal 404 error for every single menu item. As a result, the request was taking far longer than it was supposed to and once the menu got large enough, it began to hit some kind of 2.0 minute time limit and would abort the request. This resulted in a 404 error, or alternatively a 524 error when we had Cloudflare installed.
To see if that’s the issue, you can use the Query Monitor plugin to see what’s happening in the background when you save the menu. If you see a bunch of 404 errors like in the image below, then you’re probably experiencing the same issue.
To fix it, I went to the
public_html/wp-content/mu-plugins
and deleted the four files that were there, including theendurance-page-cache.php
file. I’m not sure if that was necessarily the best way to disable it, but I saved a backup of the files just in case.I had the exact same problem using Chrome – I logged out and went in via Firefox – boom working again!
Hopefully that fixes things for others? Let me know I’d love to know if that was the issue!
I had same problem but nothing from here “exactly” didn’t work but all together was helpful and I manage to find solution.
First step: I set the time limit to 120 (set_time_limit (120);) in wp-config.php.
Second step: I track and delete all lines that contains “menu_data[‘description’]”, “menu-item-description” or “menu_item->description” in wp-includes/nav-menu.php file.
Few last versions of wp have different nav-menu.php so I think that is better to explain this method than just wrote lines that you need to erase because many others with same problem may be confused.
It still takes time but it works.
I don’t know what is maximum number of menu items that you can have when you this, I have about 110 menu items and it works.