I've run into the menu limit issue on a greengeeks hosted site. I've already reviewed other threads on the wordpress.org forums regarding this issue and have implemented those solutions without any success. The strange thing is that the menus were working, though they were always unstable. Then one of the team tried to add some extra pages and the menus started to fail. Wordpress probably also was updated at this same time.
The theme is Graphene, but the problem occurs with any theme.
90 Total Menu Items currently - (over a 100 total needed)
4 Main Nav Items
17 Secondary Nav Items
69 Tertiary Nav Items currently
Updates to php.ini
The file has been updated with the following code.
Path to file: etc / php.ini
suhosin.memory_limit = 128M
suhosin.post.max_vars = 5000
suhosin.request.max_vars = 5000</blockquote>
I added this to php.ini:
<blockquote>define('WP_MEMORY_LIMIT', '128M'); </blockquote>
I have read you need to update .htaccess as below:
<blockquote>php_value suhosin.memory_limit 128M
php_value suhosin.post.max_vars 5000
php_value suhosin.request.max_vars 5000
But when I try to add the values, the site becomes inaccessible. Don't know what I am doing wrong there, I have tried adding it in different places and made sure the permissions were 666.
I have tried deactivating plugins, and changing themes. I have tried making custom menus.
I have tried deactivating Multi-level navigation. No joy.
Shows current menu. Menu times out when trying to add more navigation items.
Edited to add:
Thanks everyone. I tried everything except restarting my server. I contacted my host and they say it's not possible with my hosting plan. :-/
Hai Bui - where can I message you?
If you already tried other solutions and still cannot fix it, I can help you check the server settings, just send me FTP and WP admin info via PM.
Thanks Hai Bui. Where do I message you?
You can send me PM via http://wpquestions.com/user/contact/id/2773
Did you get my PM?
No sorry! Where is it?
All PMs will go into your email inbox (the email address you use for your wpquestions account)
Thank you, that fixed it. Best $25 I ever spent!
I think you should not place this in the .htaccess file, try php.ini instead
ps: check this out:
I encountered a similar problem myself on one site. There were too many items in the WP menu for the server to handle and it would time-out failing to update the menu.
Here's what I did that fixed the issue on this site.
<strong>First</strong>, I did not and do not recommend changing your .htaccess file.
<strong>Second</strong>, I put the following line in the wp-config.php file:
<strong>Third</strong>, I created a LOCAL php.ini file (in the same directory as wp-config.php). I put the following in this file:
max_execution_time = 90
suhosin.post.max_vars = 5000
suhosin.request.max_vars = 5000
<strong>Fourth</strong>, this server had FastCGI enabled with suEXEC also enabled. This was good for execution speed and security, but it caused occasional time-out issues and 500 errors (which are not readily identified when updating the WP menu). So, from the server's WHM Control Panel (with root access), I did the following:
1. Main >> Service Configuration >> Apache Configuration >> Include Editor
2. under "Post VirtualHost Include" select "All Versions"
3. put this code in the textarea: FcgidMaxRequestLen 52428800
NOTE: the default value is only: 131072
4. press the "Update" button
5. press the "Restart Apache" button
<strong>Fifth</strong>, after restarting Apache, I cleared the browser cache and refreshed the browser. Thereafter, all was well with the menu updates. This also fixed some intermittent issues with large image and plugin uploads.
<strong>Final analysis</strong>, WP simply hurls all menu updates to the server in a non-breaking loop ... it should be using an ajax threading model instead. But, apparently, not enough folks have scores of menu items for this to be a concern on their end.
Thanks so much for that. Unfortunately I have been informed by my host that I can't restart the server, and neither will they do it for me.
But I could try to ask them to make the changes to the Apache Configuration.
Have you tried the second and third items (mentioned in my post)? If you've tried these and the others mentioned herein, it is likely the FastCGI configuration issue.
I would gather from your reply that you are on a shared server ... not virtual or dedicated. If this is the case, they probably don't won't to restart Apache because all sites on the server would be down for a few seconds.
However, with that fourth item (with the five steps), they will have to restart Apache anyway ... it's part of the process. In fact, they would probably do this through at the command line rather than using the WHM Control Panel.
It might help to point out to them that with FastCGI versions after 2.3.6 there is a known bug that limits requests to 128kb (or 131072 bytes). Server administrators are therefore requested to set a more appropriate limit.
WordPress times-out and/or gets a 500 error when updating menus that have approximately 60 - 90 items (depending on menu item content) using the default FastCGI setting. However the fcgidmaxrequestlen setting is changed though, the new setting will not take affect until Apache is restarted.