Support

Home Forums Event Espresso Premium Migrating and testing EE on a development site

Migrating and testing EE on a development site

Posted: January 13, 2020 at 1:54 pm


accordantcompany

January 13, 2020 at 1:54 pm

Do you have documentation or can you offer general guidance about the best way to migrate and test EE on a new website?

We’re currently running EE4 (with 1 paid add-on) on a live site. We’d like to keep that running/live while we replicate that environment on a new development site (on a temporary domain). Once it all checks out and works as expected on the new site/temp domain, we’ll be moving it back to the live domain/URL.

What’s the best approach?
Do you offer any tools or documentation to help guide our effort?
Are there any considerations regarding licensing on the temporary development site?
How do we save and migrate any customizations we’ve applied (page layouts, template modifications)?

Thanks in advance for your help.


Josh

  • Support Staff

January 13, 2020 at 2:07 pm

Hi,

The approach you’ve outlined will result in losing all of the data on the live site that was added after the development site was started. Are you changing to a new WordPress theme or are the changes also involving page/post changes too?

With regards to the site license key, on the temporary domain you don’t need a license because it’s not a live site.


accordantcompany

January 13, 2020 at 2:49 pm

Hi Josh,

Yes, we’re changing the theme and most of the pages/posts will be redesigned.


accordantcompany

January 13, 2020 at 2:51 pm

Josh,

If it helps, here’s the current live site:
https://www.accordantco.com/

And here’s the development site:
http://accordantdev.com/


Josh

  • Support Staff

January 13, 2020 at 3:11 pm

It sounds like you’ll need to separate out the Event Espresso data that’s on the live site and inject it into a site with all the new content when it’s ready to go live.
Here’s one way you could do that:
1. Run the WP export tool on the development site, then set that backup aside
2. Put Event Espresso into maintenance mode on the live site (so no new registrations happen while doing the next steps)
3. Migrate the current live site’s database to the new site (minimum of wp_posts table & all wp_esp_* tables) The WP Migrate DB plugin can be used for this
4. Then delete all standard WP posts/pages on the new site
5. Then run the WordPress import tool to import the WP posts/pages, importing the export file that was made in step 1 (restoring the new site’s posts & pages)
6. If there are other custom things like theme options those would need to be re-imported too

This is best done on first on a staging server before doing the final move of the data to a live server.


accordantcompany

January 13, 2020 at 4:04 pm

Josh,

We’ve already migrated and redesigned all the existing pages and posts (everything OTHER THAN EE content) from the live site. A process that has been going on for several months. Given that we run variety of events every month that get almost daily registrations (it’s changing constantly), we’ve been holding off on migrating Event Espresso until the last phase of the redesign. We’re now at that point and ready to bring EE over – so “delete all standard WP posts/pages” as recommended in step 4 won’t work because, if I’m reading it right, it would wipe out the work we’ve done to this point. Or are you referring to JUST the EE posts and tables?

That said, here’s what we were planning to do:

1. Install EE4 plugin on the new/dev site

2. Run WP export tool for Venues, Contacts, and Events from the live site

3. Run WP import tool to import the data from step 2 into the new/dev site

4. Copy templates we’ve customized (invoices, email confirmations, etc) from the live site database and move them over to the templates folder on the new/dev site database

Would that approach work? Any potential issues/gaps to be aware of?


accordantcompany

January 13, 2020 at 4:07 pm

Josh,

Also just to be clear, Accordantdev.com is our staging site. We’re not moving the domain/URL. When the site redesign at Accordantdev.com staging is complete, we’ll be pointing it back to Accordantco.com which is where the site will continue to “live.”


Josh

  • Support Staff

January 13, 2020 at 4:37 pm

The approach you’ve outlined will not work because you’ll lose most of the Event Espresso data. Specifically, steps 2 and 3 will not transfer Event Espresso’s data. Step 4 also will not work because custom invoice templates and email templates are stored in the database, they are not loaded from a templates folder.

I’ll re-post the steps again, with additional comments to help clarify them:

1. Run the WP export tool on the development site, then set that backup aside. Also do a full database backup just in case.
2. On the live site, Put Event Espresso into maintenance mode (so no new registrations happen while doing the next steps)
3. Migrate the current live site’s database to the dev site (minimum of wp_posts table & all wp_esp_* tables) The WP Migrate DB plugin can be used for this
4. On the dev site, delete all standard WP posts/pages. The posts and pages deleted in this step are the posts/pages from the original live site, so you do want to delete them.
5. Then, on the dev site run the WordPress import tool to import the WP posts/pages, importing the export file that was made in step 1 (restoring the dev site’s posts & pages)
6. If there are other custom things like theme options those would need to be re-imported too


accordantcompany

January 13, 2020 at 5:02 pm

Re-posting an approach that’s impractical for the situation isn’t very helpful.

I was having a hard time believing this scenario is so unique such that you guys don’t already have good documentation … or even better, a built-in function that easily exports EE data (events, etc) for import to another build. So I did some digging online … lo and behold I found several other people posting on your forums asking – and then ultimately complaining – about this same topic and lack of functionality.

For example, it sounds like we’re in the same boat as this person who makes a GREAT case:
https://eventespresso.com/topic/migrate-event-espresso-to-new-site/

And here are just a few others (going back a couple of years now):
https://eventespresso.com/topic/best-practices-for-migrating-existing-site-from-staging-to-development/

https://eventespresso.com/topic/moving-data-from-ee3-on-a-production-site-to-ee4-staging-site-for-launch/

https://eventespresso.com/topic/pushing-from-staging-to-live/

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

I also noticed that approach you’ve prescribed on this thread is a sort of go-to template that hasn’t seemed to help anyone else either.

I have to say, it’s pretty disappointing.

That said, I noticed in one of the threads you begrudgingly acknowledged a need/request for a built-in EE data migration process and would add the idea to the roadmap. Any chance that gets built and rolled into an update soon? Or are we stuck trying to figure out some manual workaround?


Josh

  • Support Staff

January 13, 2020 at 5:09 pm

May I ask how is what I’ve outlined here impractical? I’ve actually used this approach and found that it works quite well. I must admit I’m a bit surprised whenever this idea gets the push back it gets, but maybe I’m missing something.


accordantcompany

January 13, 2020 at 5:52 pm

90% of the site is already rebuilt, redesigned, and ready to launch. All we need to do now is add a couple of plugins (EE, among others) and migrate the respective data. The approach you’ve described does not seem confined to just the EE tables and data/content. So in addition to being unnecessarily technical/complicated (vs a built-in tool specific to EE), it’s more likely to mess something else up in the core install that’s unrelated to EE.

In fact in one of the posts I shared above, you acknowledged as much ” …but I do agree that this isn’t the first time someone has asked about this.”


Josh

  • Support Staff

January 13, 2020 at 6:25 pm

You may not be aware that Event Espresso uses the wp_posts tables (and other native WordPress tables too). This means that migrating data from one site to another is more involved than copying over “just the EE tables”. The approach I’ve outlined works well because it isn’t confined to just the EE tables. It also works well because it’s simple and thorough: In a nutshell it deletes all the old and imports all of the new posts/pages/tags/categories/menu items.

There was another approach available at one time that made use of the Mergebot plugin, but sadly the plugin & its accompanying service was shut down. To the developers of Mergebot’s credit, making a way to automatically merge data from one site to another site isn’t quite as straightforward as it might seem, but they gave it a good effort.

Had this question been asked before the dev site had any changes made to it, you would have had the option of VersionPress, which can be used to help keep track and merge changes to the database. It cannot be made use of now because VersionPress needs to be set up before the two sites diverge.

I get your frustration with the idea of having to run more than a few steps to migrate the data, but as of right now the simplest way I can think of to accomplish what you’re looking to do involves 6 steps. It may help to know that 3 of those steps are very easy to do (1, 2, and 5 will typically take a few seconds to minutes each with a few clicks).

I can think of other ways to migrate/merge the data from wp_posts that don’t involve the above steps, but they’re more prone to error and could be a more difficult (or even an impossible) path. e.g. Another approach could be to export out all of the rows from the wp_posts table that have post types “espresso_events”, “espresso_attendees”, and “espresso_venues”, also export post_meta if applicable, then import into the new site’s database. Then export/import all of the esp_tables. This will only work if no posts from the new site’s database have the same post IDs of the EE posts. It also doesn’t handle any of the options (wp_options table) so the settings would likely need to be redone or copied over somehow.


accordantcompany

January 13, 2020 at 6:50 pm

Will the approach that you’ve outlined impact other “non-EE” posts/content that are also stored in the same wp_posts tables? In other words, will the content or layouts of other pages not related to EE potentially break or be changed in your prescribed process?


Josh

  • Support Staff

January 14, 2020 at 2:40 pm

They’ll transfer over OK because in step 1 an export/backup is made of the posts, pages, menu items, and so on. Then in step 5 the backup is imported. So unless the posts/content are storing things outside the wp_posts and post_meta tables they’ll be fully restored over to the live site.

One item I didn’t realize until I checked the dev site: I can see it currently has the Event Espresso plugin activated. That’s fine for now, but when the export is run, Event Espresso will need to be deactivated so events from the dev site do not get imported onto the live site.

Also should mention again: This should be first done on a staging server, in other words “a dry run”, before doing the final move of the data to a live server.


accordantcompany

January 15, 2020 at 1:42 pm

I see that there’s a function to export contacts/registrants to a CSV file (from the live site). But I don’t see a function that then imports that file to the dev site.

Am I missing something? Or does that functionality not exist? (i.e. you can export, but CAN’T import)


Josh

  • Support Staff

January 15, 2020 at 1:59 pm

That’s not actually an export, it’s more like a report that can be reviewed in a spreadsheet app or anything else that can open a CSV file.

There is an attendee importer add-on but I’m afraid it’s not intended to be used as a way to migrate data from website to another. The way it works is you import a CSV file with attendee data, and it imports the registrations into one event. So it would require running an import for each event.


accordantcompany

January 16, 2020 at 2:03 pm

Can that attendee importer add-on be used in the following way?

1. Setup a dummy/temporary event on dev site

2. Use the importer tool to export attendees from live site and import all of them to the temp event on dev site

3. Delete temp event (but retain all imported attendee records on dev site)

Thinking it would at least move the 2,500+ registrants/contacts we have in the live EE database over to the dev site- then we’d just recreate the handful of current/active events manually in the dev site.

Would that work?


Josh

  • Support Staff

January 16, 2020 at 2:57 pm

Step 3 isn’t possible because the registrations would then be “orphaned” without an event.


accordantcompany

January 16, 2020 at 4:49 pm

But they’d remain in the database as Registrants/Contacts for historical purposes, correct?


Josh

  • Support Staff

January 17, 2020 at 8:13 am

You could trash the event, but if you go further and try to delete it permanently, the option to permanently delete will not be there because the registrations are still attached to the event.

There’s a new feature being developed that will allow for deleting and event that has registrations attached to it, but what it does is it deletes the registrations along with the event when permanently deleting an event.

The support post ‘Migrating and testing EE on a development site’ 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