Support

Home Forums Event Espresso Premium EE3 – Moving events/attendees between wordpress installations

EE3 – Moving events/attendees between wordpress installations

Posted: October 16, 2014 at 12:25 pm


cgreenberg

October 16, 2014 at 12:25 pm

I’ve been developing a new version of a website for a client, using a sandbox installation running on a separate server. The plan is to migrate the finished version to replace the original, but I’ve run into a problem where my client has added new events (in EE3) on the production server/installation and customers have started signing up as attendees. I can’t seem to export the events/attendees and import them into the sandbox installation in order to sync things up.

What’s the best method of exporting either individual events with their attendees or all events and their attendees, in order to import them into a separate WordPress/Event Espresso installation?

I’ve followed the steps here, and ended up with this result. You can see the response from EE saying it added 5 events to the database, but only the existing three events (visible at the bottom) show up in the Event Overview part of EE afterward.


Josh

  • Support Staff

October 16, 2014 at 2:47 pm

Hi there,

The Event Import tool will import only events, not attendees. I’d advise copying over all the database tables that have _events in their name from the one site into the other site. Either phpmyadmin or adminer both can be used. This way you’ll get all the events, registration forms, categories, discount codes, pricing, and attendee data copied over along with all the relationships between them.


cgreenberg

October 20, 2014 at 2:49 pm

No luck; when I copied over the _events tables (export from live server, import into development server to sync them up) I ended up with no events in my Event Overview section of EE. See this screenshot. Any idea why this might have happened, or any ideas for alternate solutions?


Josh

  • Support Staff

October 21, 2014 at 8:25 am

One idea on why this would happen is if the table prefixes do not match. Do the prefixes for the tables you imported match the prefixes for the tables that are already there?

Another way to do this would be to use the WP Migrate DB Pro plugin. It automates the process and will let you push the data from one to to the other.

https://deliciousbrains.com/wp-migrate-db-pro/


cgreenberg

October 21, 2014 at 12:01 pm

The table prefixes are identical. I’m wary about purchasing a plugin to automate a process that already isn’t working manually, but if you don’t have any other suggestions I’ll give it a try. I’ve made sure that both instances are running the same version of EE3, tried the process again, and without fail I end up with no records found in my EE Event Overview.


cgreenberg

October 21, 2014 at 12:47 pm

Furthermore, the tables seem to be importing perfectly – for example, the ‘wp_events_detail’ table lists the correct events on both the production and testing servers. It seems like EE isn’t looking in the right place for the necessary information.


Josh

  • Support Staff

October 21, 2014 at 1:29 pm

There’s a free version of the Migrate DB plugin.

As an aside, the screenshot you linked to has events with start dates from 2012, which would not show up in the newer version of Event Espresso 3 anyway because it filters those out by default. Here’s a screenshot that outlines the select box and button that you use to view past events.


cgreenberg

October 22, 2014 at 10:00 am

Unfortunately, the free version of the Migrate DB plugin only imports the entire DB, not select tables. Furthermore, all the _events tables seem to be identical on both installations now, which leads me to believe it must be something else.

The filter controls don’t help, unfortunately. EE must be referencing a different part of the DB, as the two installations aren’t in sync despite having identical _events tables. Is there an email I could send login information so that you can confirm this and see what I’m seeing?

Here are screenshots with the filter controls showing all events:
Test server
Production server

As you can see, despite syncing the _events tables, the test server is still missing all the new attendees and events.


Josh

  • Support Staff

October 22, 2014 at 11:06 am

No need to send log in info, I believe you. Can you check the wp-config.php files for both sites and check to see what’s set there in each for the $table_prefix value?


cgreenberg

October 22, 2014 at 11:42 am

Both sites are using:
$table_prefix = ‘wp_’;


Josh

  • Support Staff

October 22, 2014 at 1:28 pm

Thanks for checking. I’ll outline the steps I take when I need to move event data from one site to another. For clarity “Site New” is the site that has the new data, and “Site Old” is the site that has the old data.

1) Deactivate the Event Espresso plugin on both sites.
2) Export the _events tables from Site New.
3) Reactivate Event Espresso on Site New.
4) Backup the database on Site Old.
5) Drop the _events tables on Site Old.
6) Import the _events tables onto Site Old.
7) Reactivate Event Espresso on Site Old.


cgreenberg

October 22, 2014 at 5:43 pm

I tried your process, deactivating the plugins on either side of the export/import, but the results are the same.

Is there nowhere else that the plugin could be looking for this information?


Josh

  • Support Staff

October 22, 2014 at 6:49 pm

Did you drop the old events tables on Site Old? That’s the other place it could be looking in.

I’ll post the code in espresso.php that defines the tables it uses so you can verify whether you’re dropping and importing the correct tables:

//Define all of the plugins database tables
define("EVENTS_CATEGORY_TABLE", $wpdb->prefix . "events_category_detail");
define("EVENTS_CATEGORY_REL_TABLE", $wpdb->prefix . "events_category_rel");
define("EVENTS_DETAIL_TABLE", $wpdb->prefix . "events_detail");
define("EVENTS_ATTENDEE_TABLE", $wpdb->prefix . "events_attendee");
define("EVENTS_ATTENDEE_META_TABLE", $wpdb->prefix . "events_attendee_meta");
define("EVENTS_START_END_TABLE", $wpdb->prefix . "events_start_end");
define("EVENTS_QUESTION_TABLE", $wpdb->prefix . "events_question");
define("EVENTS_QST_GROUP_REL_TABLE", $wpdb->prefix . "events_qst_group_rel");
define("EVENTS_QST_GROUP_TABLE", $wpdb->prefix . "events_qst_group");
define("EVENTS_ANSWER_TABLE", $wpdb->prefix . "events_answer");
define("EVENTS_DISCOUNT_CODES_TABLE", $wpdb->prefix . "events_discount_codes");
define("EVENTS_DISCOUNT_REL_TABLE", $wpdb->prefix . "events_discount_rel");
define("EVENTS_PRICES_TABLE", $wpdb->prefix . "events_prices");
define("EVENTS_EMAIL_TABLE", $wpdb->prefix . "events_email");
define("EVENTS_VENUE_TABLE", $wpdb->prefix . "events_venue");
define("EVENTS_VENUE_REL_TABLE", $wpdb->prefix . "events_venue_rel");


cgreenberg

October 22, 2014 at 9:01 pm

I did drop those tables, and imported them correctly – they’re identical on both installations.

I also have additional _events tables, such as _personnel and _qst_group. Does that change things? See this screenshot for the full list.


cgreenberg

October 22, 2014 at 9:03 pm

Edit: noticed that _qst_group was in your list when I double checked. Your list doesn’t contain items such as _events_locale or _events_meta, however. Is this a version problem?


Josh

  • Support Staff

October 23, 2014 at 8:07 am

Hi there,

The _events_locale and _events_personnel are used by the Roles and Permissions add-on and I didn’t include them in the list because not everyone uses those. _events_meta isn’t used at all unless you’ve done some custom development work that makes use of it.

Are the Roles and Permissions add-ons active on the dev site? If so, then what may be happening here is the user tables between the two sites don’t match and you’re not seeing the events created by another user account.

Here are a few things you can try on the dev site:

1) Deactivate the Roles and Permissions add-on.
2) Check the _events_details table on the dev site for the missing events to see if they are there.
3) Migrate the entire database using WP Migrate DB or WP Migrate DB Pro. You could even try this onto a new dev site if you prefer to keep the existing dev site as is.

The support post ‘EE3 – Moving events/attendees between wordpress installations’ 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