Hi @jreese78254,
Thanks for reaching out to us. Appreciate you providing more information about what you’re trying to accomplish here.
First, we advise against this strategy as there would be private and draft posts (ntm other post types, not events) — there might be conflicts in the long run. However, if there is no content updated on the production website, and your dev site contains the very latest event content, then it should be fine.
On the other hand, if there are events updated from the production website, but the rest of the content is on the dev site, then it might cause a problem.
We advise reconsidering your process or make sure that events are also updated on the dev site, or find a way to exclude event related posts and taxonomies from the database you’re pushing from the dev site.
Let me know if this helps, or if you do have more questions.
Best,
Abz
What we would like to do is just keep maintaining the Events Calendar on our Live site and not update the Dev content at all. The main reason is that we are using Dev for content development for the release, and the Events Calendar content will not track against the release, but rather a training schedule independent of any release.
We shouldn’t be doing any updates in Dev for this as all, so I was hoping if the entries on the Live site had a greater timestamp (later date) than what is in Dev, then we would be okay.
Also, if you know what tables we should possibly look at exporting on the Live site, shouldn’t this protect us from issues. We discovered that our hosting site’s push upstream doesn’t allow us to push just certain content. It is an all or nothing system. This is why to preserve our Live users versus our Dev users, we have to export the user tables and user metadata.
Hi @jreese78254 ,
Our events are a WordPress custom post type so all the data that you would need for each individual event can be found in the posts and postmeta tables of your database.
Just to be completely safe we recommend that you make a backup of your site before making any changes.
Best regards,
Marta
How about if we export all posts and events, do our push, and then reimport the posts and events? It seems like the Events XML file has the content that is found in our events, so I am hoping that would preserve the content so we could then reimport after each push.
Hi @jreese78254, that could be a solution. One way to know is to test it out. Please keep a working backup of your websites, both staging and live site. I would also suggest that you could create another temp live site to test.
Moreover, I would check with our team if there are any issues with what you’re trying to do here. I’d get back to you when I know more.
Have a great day.
Best,
Abz
What seems to happen with import and export is that we can export what is showing as “Events”, but when we reimport, it does a merge not an overwrite.
If we knew what tables to export using SQL Workbench, we are already having to export the user data so we can keep separate user sets.
We ended up with duplicate events when the import was finished.
Hi @jreese78254
The generic process you described – keeping the events on production and pushing other content from staging – will not work reliably.
Also exporting, then reimporting events will not work well either, as you have already experienced.
The reason is how WordPress handles post data. All posts, including custom post types like events, venues, organizers, WooCommerce products, etc., are stored in the wp_posts table and their respective metadata in the wp_postmeta table.
The two are linked together by the post ID.
When you push data from staging, you mentioned you cannot do a partial push. So all of your wp_posts table will be overwritten, and you will lose the events.
When doing export-import, what can happen is that you export the events and the relevant data, including the venues and organizers. These as well are all connected by the post ID of the event.
When you reimport an event, it is not guaranteed that it will get the same post ID as it had before. If it gets a new one – which is very likely – then the connection between the event and the organizers and venues will break.
If you want to stick to pushing releases from staging to production, you need to include events and basically all data as well if you want it to work well.
Hope this helps.
Cheers,
Andras
Hey @jreese78254, this thread has been inactive for a while, so we’re going to go ahead and mark it Resolved. Please feel free to open a new thread if any other questions come up, and we’d be happy to help.
Cheers,
Abz