WordPress.org

Ready to get started?Download WordPress

Forums

Accidentally deleted entire menu (8 posts)

  1. hillaryf
    Member
    Posted 1 year ago #

    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!

  2. David Williamson
    Member
    Posted 1 year ago #

    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.

  3. Brandi Ajah
    Member
    Posted 6 months ago #

    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?

  4. Tara
    Member
    Posted 6 months ago #

    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.
    http://codex.wordpress.org/WordPress_Backups
    http://codex.wordpress.org/Backing_Up_Your_Database
    http://codex.wordpress.org/Restoring_Your_Database_From_Backup

  5. fxsvelo
    Member
    Posted 4 months ago #

    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

  6. leejosepho
    Member
    Posted 4 months ago #

    What file is this in?

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

  7. Tara
    Member
    Posted 4 months ago #

    you can read more about database here : https://codex.wordpress.org/Database_Description

  8. fxsvelo
    Member
    Posted 4 months ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic