Title: Reset (clean up) database
Last modified: January 12, 2021

---

# Reset (clean up) database

 *  Resolved [TheMann00](https://wordpress.org/support/users/themann00/)
 * (@themann00)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/reset-clean-up-database/)
 * We are kind of hitting reset on Events Manager. Covid provided the opportunity
   to really clean it out. All events have been deleted. However, when you go into
   the Events dashboard, it shows over 10,000 events as a count, even though there
   are none actually listed.
 * This likely dates back to an attempt many many years ago to bulk-delete some 
   events via a sql command. This removed the events, but not properly. So I know
   what caused the issue. Now I’m just trying to fix it.
 * The best method, by far, would be to uninstall and delete all tables, and then
   re-install. The only problem with that solution is we would lose 1,341 locations.
   We do NOT want to lose those. Just all the events.
 * I’m looking for the best way to clean up the false records counting, or export
   the locations, do a fresh install of the plugin, and then import the locations
   back in. A lot of these locations are full content articles, with paragraphs 
   and paragraphs of content, as well as multiple images. I don’t want to have to
   fix/reformat any of that.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [rmz65](https://wordpress.org/support/users/rmz65/)
 * (@rmz65)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/reset-clean-up-database/#post-13906882)
 * You probably have ‘orphaned events’.
 * Go to the Events Manager Settings, General, Admin Tools (Advanced).
    There you’ll
   find a button “Remove Orphaned Events”, which should take care of this issue.
 * Always make a backup before you run some tool like this!
 *  Thread Starter [TheMann00](https://wordpress.org/support/users/themann00/)
 * (@themann00)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/reset-clean-up-database/#post-13928481)
 * So- this is getting close. It shows
    `All (10,482) | Published (10,478) | Pending(
   4) | Orphaned content (10478)`
 * But remove orphaned events only clears up 91.
 * Any other ideas? Are these SUPER Orphans?
 *  Thread Starter [TheMann00](https://wordpress.org/support/users/themann00/)
 * (@themann00)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/reset-clean-up-database/#post-13928486)
 * (by the way- When I click on the orphaned content tab- it just shows “no events
   found”)
 *  Plugin Support [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * (@angelo_nwl)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/reset-clean-up-database/#post-14114853)
 * you can backup your database first and then try Events > Settings > General >
   Admin Tools > Uninstall/Reset > Reset Then manually you can add your previous
   events and locations. You might need to include wp_posts and wp_postmeta where
   post_id is equivalent to wp_em_events post_id

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Reset (clean up) database’ is closed to new replies.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=1039078)
 * [Events Manager - Calendar, Bookings, Tickets, and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/reset-clean-up-database/#post-14114853)
 * Status: resolved