• Resolved jreese78254

    (@jreese78254)


    I am working in sort of an unusual development/production environment, and I am concerned that when we push our content that it will overwrite calendar events. Let me explain our scenario.

    We use Pantheon’s development environment to publish a Knowledge Base. This includes a development, testing, and live environment. We do all of the content creation in development and then push upstream to the Live environment. Now with the Events Calendar, I believe those events will be created in the Live environment. How do we avoid overwriting the events in Live with content being pushed from Dev? For example, let’s say we have a July event that has been updated in Live. We push content from Dev to Live, and we go to look at the events to verify that they are correct. Will the data be lost…overwritten? If the event didn’t exist in Dev would that prevent the Live environment from being changed.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support Abz

    (@abzlevelup)

    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

    Thread Starter jreese78254

    (@jreese78254)

    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.

    Thread Starter jreese78254

    (@jreese78254)

    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.

    Plugin Support iammarta

    (@iammarta)

    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

    Thread Starter jreese78254

    (@jreese78254)

    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.

    Plugin Support Abz

    (@abzlevelup)

    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

    Thread Starter jreese78254

    (@jreese78254)

    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.

    Thread Starter jreese78254

    (@jreese78254)

    We ended up with duplicate events when the import was finished.

    Plugin Contributor Andras Guseo

    (@aguseo)

    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

    Plugin Support Abz

    (@abzlevelup)

    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

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Database Tables for Export’ is closed to new replies.