Ask your WordPress questions! Pay money and get answers fast! (more info)

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

menu items can't be added in wordpress

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:

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


suhosin.memory_limit = 128M

suhosin.post.max_vars = 5000

suhosin.request.max_vars = 5000

I added this to php.ini:
define('WP_MEMORY_LIMIT', '128M');

I have read you need to update .htaccess as below:

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.

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?

This question has been answered.

attachment image View Attachment

DebbieJ | 07/17/12 at 7:02am Edit

Previous versions of this question: 07/17/12 at 10:39am

(7) Possible Answers Submitted...

See a chronological view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    Francisco Javier Carazo Gil says:

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

  • avatar
    Last edited:
    Daniel Yoen says:

    how about this on .htaccess :

    <IfModule mod_php.c>
    php_value suhosin.simulation 1

    hope this help

  • avatar
    Last edited:
    Navjot Singh says:

    This line

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

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

  • avatar
    Last edited:
    Dbranes says:

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

    ps: check this out:


    Previous versions of this answer: 07/17/12 at 7:26am

  • avatar
    Last edited:
    Hai Bui says:

    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.

    • 07/17/12 10:41am

      DebbieJ says:

      Thanks Hai Bui. Where do I message you?

    • 07/17/12 10:54am

      Hai Bui says:

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

    • 07/17/12 1:25pm

      Hai Bui says:

      Did you get my PM?

    • 07/17/12 1:43pm

      DebbieJ says:

      No sorry! Where is it?

    • 07/17/12 1:47pm

      Hai Bui says:

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

    • 07/18/12 3:30am

      DebbieJ says:

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

  • avatar
    Last edited:
    Luke America says:

    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.

    First, I did not and do not recommend changing your .htaccess file.

    Second, I put the following line in the wp-config.php file:

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

    Third, 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

    Fourth, 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

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

    Final analysis, 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.

    • 07/17/12 2:46pm

      DebbieJ says:

      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.

    • 07/17/12 5:06pm

      Luke America says:

      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.

  • avatar
    Last edited:

    This answer was downvoted by the top experts.

This question has expired.

Gabriel Reguly had additional discourse to offer.

Gabriel Reguly, Arnav Joy, Martin Pham, DebbieJ voted on this question.

Current status of this question: Completed

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.