Error when updating custom menu in WordPress

10 replies
Anyone know what this means and how to fix it

Fatal error: Maximum execution time of 30 seconds exceeded in /home/develo25/public_html/wp-includes/formatting.php on line 80

it happens whenever I try to add a page or post to my menu. I hit save menu and get that error. I've already posted on the WP forums, but they are extremely slow there, if they even get to you.My menu has a little over 100 items in it.

If anyone knows what to do that'd be great
#custom #error #menu #updating #wordpress
  • Profile picture of the author joebel
    Try to go to the Editor of your themes and in the php file go to line 80, there you might find an answer to your question.
    {{ DiscussionBoard.errors[3605426].message }}
  • Profile picture of the author Adam Struve
    Try putting this in your htaccess file

    php_value max_execution_time 90

    That will just increase your max execution time form 30 seconds to 90 seconds. The error you are getting is because the script is taking longer than 30 seconds to process. It could be related to you having over 100 items in it like you said. If 90 seconds still isn't enough you can increase it some more.
    {{ DiscussionBoard.errors[3607181].message }}
    • Profile picture of the author developyourlife
      Originally Posted by Adam Struve View Post

      Try putting this in your htaccess file

      php_value max_execution_time 90

      That will just increase your max execution time form 30 seconds to 90 seconds. The error you are getting is because the script is taking longer than 30 seconds to process. It could be related to you having over 100 items in it like you said. If 90 seconds still isn't enough you can increase it some more.
      Hey, where exactly should I put this? If I just throw it in there it gives my site an error.
      {{ DiscussionBoard.errors[3609130].message }}
  • Profile picture of the author pbarnhart
    If you have one of several database backup plugins, this can add considerable overhead when saving in WP. Disable it while you are saving.
    {{ DiscussionBoard.errors[3608603].message }}
  • Profile picture of the author DominicF
    Is it only happening when you are adding items to the menu?
    {{ DiscussionBoard.errors[3609679].message }}
    • Profile picture of the author developyourlife
      Originally Posted by DominicF View Post

      Is it only happening when you are adding items to the menu?
      If I try to add anymore items than what's on it right now it will give me the error. I'm wondering if the total amount of pages allowed in a menu is 100. I've tried it on different computers on different connections too, so that isn't the issue.
      {{ DiscussionBoard.errors[3610021].message }}
  • Profile picture of the author jelvidge
    Did you ever find a resolution to this issue? I'm having the same problem on a site that is due to launch with kind of a lot of fanfare in 3 days (on Friday) and I'm stressing a bit as I can't modify my menu! Any direction you could provide me with as to what you found to be the problem and/or fix would be greatly appreciated. Thanks!

    J
    {{ DiscussionBoard.errors[3657810].message }}
  • Profile picture of the author SteveJohnson
    Here's something you can try, but use at your own risk and back up your database FIRST!!

    There are issues with the menu system that are being addressed for future versions of WordPress. One of those is that when you add a page or post as a menu item, the complete text of the page or post is used as the menu item description. It's unnecessary and causes a lot of overhead.

    You'll have to go directly into your database for this, using phpMyAdmin or whatever database management system your hosting company provides. Be sure to use the proper table prefix - usually 'wp_', but your installation may be different.

    Run the following query:
    Code:
    UPDATE wp_posts SET post_content = '' WHERE post_type = 'nav_menu_item'
    Note that after "post_content =" is two single quote marks with no space between, not a double quote.

    The query will remove the post_content of menu items that is used as a description.

    I CAN NOT STRESS THIS STRONGLY ENOUGH...BACK UP YOUR DATABASE BEFORE YOU DO THIS!!

    This fix is not for the light-hearted or non-technically savvy, and it may not in fact work. I know people who've had the same issue that have used this and the problem went away, but there are no guarantees.
    Signature

    The 2nd Amendment, 1789 - The Original Homeland Security.

    Gun control means never having to say, "I missed you."

    {{ DiscussionBoard.errors[3658051].message }}
  • Profile picture of the author msaqib301
    Try to go on 80 line and try to find its way
    {{ DiscussionBoard.errors[3658422].message }}

Trending Topics