Support

Home Forums Event Espresso Premium Export and Import Event Data

Export and Import Event Data

Posted: July 10, 2024 at 5:43 pm

Viewing 4 reply threads


Lake WebWorks

July 10, 2024 at 5:43 pm

Hi, we’ve been using EventEspresso for years and are in the process of redesigning our site. We’ve cloned a development copy and redesign is under way, but in the meantime, new events are getting added to the live site. When the time comes, we’ll need to export the event data from the outgoing live site to the incoming development site. I’ve searched the forums and it seems like as recently as 2021, there was no way to do this. I thought I’d ask to see if a method has been developed in the last few years, as I imagine this is a common scenario.

Can you provide any guidance on how we might proceed with an export / import of event data from one site to the other? Thanks!


Rio

  • Support Staff

July 10, 2024 at 9:14 pm

We do not have that feature at the moment, but I can see the export and import feature of event is listed as planned feature.

I will check with our tEEm if cloning tables in the DB will work. Ill get back to you once i heard a word from them.

thanks


Lake WebWorks

July 11, 2024 at 11:52 am

Thanks for the reply Rio, please let me know what you find out. I’m wondering if I can simply export all of the database tables that begin with the wp_esp_ prefix from the live site, then import them into the dev site’s database? I read something on another forum post that leads me to believe that this may not work due to foreign keys connecting to other wp tables, but I’d like to confirm that.

Surely there must be some way of doing it. If not, that means to continue using EventEspresso we’d need to manually re-enter all of the events, which would be very labor intensive.

Let me know what you can find out, or if we might fast track that feature.

Thanks,
David


Sam

  • Support Staff

July 11, 2024 at 1:23 pm

Hi David,

Exporting database tables won’t help copying the event data.

You cannot just copy the EE tables over as a lot of EE entities are a custom post type within the wp_posts table. Let’s use events as an example, an EE event may be stored within wp_posts with the ID of say 333.

Everywhere within our EE tables we use that as the foreign key so let’s say Datetimes as a quick example, datetimes are stored in the Database like this: https://monosnap.com/file/th8NxMfJOoBk08ZHaEOwyKcMGDjSCJ

Notice how it stores the EVT_ID in the table, thats the foreign key, its the ID of the CPT in wp_posts. So any Datetimes in that table for event 333 would note EVT_ID 333 there.

So if you copy over JUST the _esp_ tables (EE4 tables) pretty much ALL of those foreign keys are wrong. that EVT_ID of 333 may now point to say a standard post/page or some other post type and things just stop working, events will be missing, EE_Attendees will be missing etc etc.

We can’t ‘import’ rows from one wp_posts table to another as the ID auto increments so again the ID’s won’t match AND if the new site you’re importing into already has posts. you break them if you manage to replace the rows with ours (again, remember that right now I’m JUST talking about events. This applies to many other things within EE too).

So for this to actually work we would need to export all of the EE data from the standard tables to a file, then Import that into a new site using a script that can first note the current ID from the original dataset, import the event into wp_posts, map the NEW id for that event and then import ALL of the related data for that event and update the foreign keys everywhere they are used to use the NEW id.

Or it exports all _esp_ tables and only has to actually ‘import’ the data for wp_posts but then updates the DB table using the new keys, It’s a similar story either way.

We also have other WP core functions to consider, for example, terms, that would need to be exported, imported, and migrated correctly.

Note: If you are using any page builder on your site which is having Import/export option then you can export the pages as per your requirement.


Lake WebWorks

July 11, 2024 at 1:47 pm

Hi Sam,

Thank you for the detailed response. So what I’m hearing is that there is currently no way to export/import Event Espresso events, and that they would need to be manually re-entered into the new site under-development. Is that an accurate statement?

Best,
David


Rio

  • Support Staff

July 11, 2024 at 5:03 pm

Right, but this issue is brought to our tEEm and would probably consider this. But we cannot give you timeline at the moment.

Instead of importing events/registration, our suggestion is to export the pages/post/designs. If you’re using page builder you can export the designs you have done in your staging to your live site. There’s also option to export WP page and import it.

thanks

Viewing 4 reply threads

The support post ‘Export and Import Event Data’ 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