Support

Home Forums Event Espresso Premium Event Espresso Database Import

Event Espresso Database Import

Posted: October 16, 2019 at 5:07 pm

Viewing 1 reply thread


rmazook4

October 16, 2019 at 5:07 pm

What are the tables that I would need to export as an SQL file and then import into my new DB to populate all user data and events? I’m building a new website and none of the forum posts I’ve read have provided an easy way to do this so I’ll just import SQL files myself. I know that esp_payment holds all the records of payments made. I also need all registrations, all events…everything. I am hoping that I do not need to go this route:

https://eventespresso.com/topic/import-and-export-events-and-registration/

And that I can just export the proper event espresso tables instead of exporting the entire database of the site we’re rebuilding.


Tony

  • Support Staff

October 17, 2019 at 2:12 am

Hi there,

The reason the forum threads have not provided an easy way to do this yet is basically that there isn’t one.

Yes, we have our own tables and they all have a prefix of {table_prefix}esp_.

{table_prefix} is often just wp_ so, for example, one of the tables on one of my test sites would be wp_esp_registration so they are easy enough to find, however…

You can’t just export the EE tables and import them into another DB because EE uses custom post types for events, attendees, venues etc. That means you’ll have entries in wp_posts for those entities which wouldn’t be transferred over to the new site.

Next it may sound logical to pull the EE posts from the wp_posts table and import them into the new sites wp_posts table at the same time, however, the ID’s of those entries will not match the ID’s used as foreign keys in the esp_ tables after you have imported them (We have to link all of the data together somehow, using the ID’s is the correct way to do that).

Even if you forced the ID’s from site 1’s wp_posts table into sites 2’s wp_posts table, what happens when there is a conflict and another post already had that ID? (wp_posts auto increments the ID every time something is added, so it’s very likely there will be a conflict on a new site) You’ve now either broken your EE entity or a post/page/whatever using wp_posts.

So currently, there is no easy method to do this, some form of export/import function will be needed which replaces the ID’s for the above throughout the EE tables when needed and it’s not something we have available currently.

You can either export the whole DB from one site to another and then remove what you don’t need, or some users have ‘archived’ the current data under a subdomain and started fresh with the ‘new’ site.

Viewing 1 reply thread

The support post ‘Event Espresso Database Import’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso