A while ago I found a cool blog post that detailed how to empty the menu tables, and rebuild the menu system with a drush php call, a necessity since the site will be unusable after emptying those mysql tables. This way, you could reset your menus like it was a new Drupal site.

Can anyone detail this technique or do you have the link for that blog?

  • Are you talking about clearing menu cache ?
    – Anil Sagar
    Commented Oct 23, 2012 at 6:47
  • No, cleaning menu cache is insufficient for fixing a garbled menu. Sometimes menus get messed up. Especially the administration menu.
    – giorgio79
    Commented Oct 23, 2012 at 9:04
  • Why the -1? It's a valid question. +1'ing to counteract.
    – aendra
    Commented Oct 23, 2012 at 11:04
  • How were these menus created? I ask because if they were created by a module, then you'd can deactivate the module. That should remove offending menu items. If you remove from the database and code to create these still exists, they could pop up again.
    – Rick
    Commented Nov 15, 2012 at 16:06

3 Answers 3


I have answered this question here How do I call the menu_rebuild function in Drupal 7?

It worked for me just fine.


I have been looking a while for a solution to the problem to rebuild Drupal menus until I stumbled upon a Drupal issue that helped me. My solution (in a php script) is the following:

db_query("DELETE FROM {menu_links} WHERE module = 'system'");
db_query("DELETE FROM {menu_links} WHERE menu_name = 'management'");

This could also be done by entering the queries through phpmyadmin or something alike:

DELETE FROM {menu_links} WHERE module = 'system'
DELETE FROM {menu_links} WHERE menu_name = 'management'

And then rebuilding the menu structure. If you use the devel module, you can achieve that by visiting the page /devel/menu/reset. I you don't have the devel module, I'm not sure how to rebuild the menu structure.

Don't forget to backup your database before you try this.


Maybe this is post: http://www.zyxware.com/articles/2454/how-to-rebuild-menu-links-table-and-rebuild-the-navigation-menu

DELETE FROM menu_links WHERE menu_name='navigation'

Then visit modules page, and the menu will be rebuilt.

I tested in Drupal 6.

  • Thanks, I was thinking of another one where the blogger deleted every menu, and rebuilt it with Drush.
    – giorgio79
    Commented Oct 25, 2012 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.