Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

menu items can't be added in wordpress WordPress

  • SOLVED

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.

More info:

Hosting:
Green geeks

WordPress Setup:
Wordpress 3.4.1

PHP 5.3.13

The theme is Graphene, but the problem occurs with any theme.

Menu breakdown
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

<blockquote>extension=suhosin.so

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
</blockquote>

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.

Screenshot attached
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?

Answers (7)

2012-07-17

Hai Bui answers:

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.


DebbieJ comments:

Thanks Hai Bui. Where do I message you?


Hai Bui comments:

You can send me PM via http://wpquestions.com/user/contact/id/2773


Hai Bui comments:

Did you get my PM?


DebbieJ comments:

No sorry! Where is it?


Hai Bui comments:

All PMs will go into your email inbox (the email address you use for your wpquestions account)


DebbieJ comments:

Thank you, that fixed it. Best $25 I ever spent!

2012-07-17

Francisco Javier Carazo Gil answers:

Have you restarted your server after changing your values in php.ini?

2012-07-17

Daniel Yoen answers:

how about this on .htaccess :

<IfModule mod_php.c>
php_value suhosin.simulation 1
</IfModule>


hope this help

2012-07-17

Navjot Singh answers:

This line

define('WP_MEMORY_LIMIT', '128M');

should go in your wp-config.php and not php.ini. Please check.

2012-07-17

Dbranes answers:

I think you should not place this in the .htaccess file, try php.ini instead

ps: check this out:

[[LINK href="http://wordpress.org/support/topic/i-can-not-for-more-than-15-menu-items-why"]]http://wordpress.org/support/topic/i-can-not-for-more-than-15-menu-items-why[[/LINK]]

2012-07-17

Luke America answers:

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:


define('WP_MEMORY_LIMIT', '128M');


<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.


DebbieJ comments:

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.


Luke America comments:

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.

[[LINK href="http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidmaxrequestlen"]]apache.org[[/LINK]]

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.





2012-07-18

tdeodatoermi answers:

North bag 2012 fall handbag chain of the Korean version of the n - $39.00 : TITLE, SITE_TAGLINE