• Please help!!

    While working in the menus section (appearance –> menu, I accidentally deleted the “primary menu” we had set up for our website. I thought the delete button would simply delete the new menu item I had been trying to create, but instead it deleted the entire thing. How can I retrieve the original menu I had already had set up?

    Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Unfortunately once you’ve deleted a menu there isn’t a way to get them back like there is for posts or comments in the Trash.

    If you have a recent database backup you could restore from that and it would be included but keep in mind that anything you’ve done since that backup was made would probably be lost. Otherwise your best option is to create a new menu.

    If you want to delete an individual menu item from a menu you have already created you need to expand the item by clicking the little arrow on the right of the item and then clicking the Remove link (in red).

    There is more information about how to use custom menus available from the Codex page Appearance Menus Screen.

    Hope this helps, sorry there isn’t better news for getting back your deleted menu.

    same thing just happened to me… could you please create a warning for this??? i am pretty t-offed. Where would i find a back up? timemachine?

    Moderator t-p

    (@t-p)

    Where would i find a back up?

    Have you made one yourself?
    No? Ask your hosting provider if they have a backup of your site.

    If they don’t have it, you are probably out of luck. Then, as @david suggested, your best option is to create a new menu.

    Always make sure you backup everything (including your database) before doing any actions, just in case.
    https://codex.www.ads-software.com/WordPress_Backups
    https://codex.www.ads-software.com/Backing_Up_Your_Database
    https://codex.www.ads-software.com/Restoring_Your_Database_From_Backup

    I deleted my menu too. But I can’t create a new one. When I try to create a new menu, there is nothing on the left side to choose from, just a blank area where the page listing should be.

    I downloaded WordPress to my local machine and I’ve re-created the site locally so I can see what it’s supposed to look like. My pages are all public.

    How do I fix this? What file is this in?

    thanks

    What file is this in?

    The database is where WordPress stores and retrieves those kinds of things.

    Moderator t-p

    (@t-p)

    you can read more about database here : https://codex.www.ads-software.com/Database_Description

    According to the doc:
    The core of the WordPress data is the posts. It is stored in the wp_posts table. Also Pages and navigation menu items are stored in this table.

    And if you look in the wp_posts table of a site with a menu you can see records with no content but with a post_status of nav_menu_item. This seems to be how the menu is built.

    But in my wp_posts table of the site with no menu, I don’t even have these records with nav_menu_item so I don’t think I can reconstruct this or at least it seems like it would be too difficult.

    Is there a way to delete and rebuild this table? I only have a few pages and I have that content. I don’t have any blog posts.

    Or do I need to do a complete reinstall of WP?

    And yes, next time I’ll start backing up the db before I start changing things.

    thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Accidentally deleted entire menu’ is closed to new replies.