• I am a new developer. Trying to figure out staging/deploy. I’ve watched a ton of Youtube videos, searched tutorials and reached out to siteground’s support. The videos and tutorials talk about everything except what I’m asking. And I am sure it’s how I am communicating my question with siteground that is causing the confusion. lol I keep running into walls.

    Currently, when I do a full deploy, it wipes out any user data on the live site. So when new users enroll and post, etc. It’s all gone during a full deploy. Other than that, the full deploy is what I want. I just need to keep new user profiles that are added, their account information, comments, posts, etc. that are all done on the live site.

    How do i do a full deploy including what is done by both developer and user on staging, WITHOUT losing user profiles, comments, posts, account info, etc. that is done on the live site?

    Notes: nothing is done as a developer on the live site. but there is user changes/deletions/additions on both that I want to keep. there is never a time when the same user makes changes on both live and staging.

    • This topic was modified 2 years, 10 months ago by Jan Dembowski.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator bcworkz

    (@bcworkz)

    It’s impractical to merge two different versions of a DB into one because you’ll end up with different records with the same ID. All IDs are required to be unique. You need to decide which DB version you want to keep. Any changes to the other will be lost.

    You can usually modify code in staging and safely migrate it to production since production code shouldn’t be changing while you’re working on staging. If the the production site is actively adding users and content while work on staging is progressing, you must minimize adding content and users to staging. Any that are added will need to be manually duplicated in production. Then you are not really deploying staging, you’d mainly only be migrating code changes.

    Thread Starter onfleekresources

    (@onfleekresources)

    that’s what i thought. however, that is not what is happening. or i’m not doing something right which is totally possible. lol

    i made changes as a user in live then went to staging and did a custom deploy excluding the post and postmeta from the database and it still wiped out what I did in live as a user.

    I’d like to get up and running live but I’m still developing my site. My plan was to continue working on things in staging while the site is live and then just pushing out the changes as I do them which is what I thought a staging site was for but i can’t figure out how to push those changes out without completely wiping out activity in live

    Thread Starter onfleekresources

    (@onfleekresources)

    not right*

    Thread Starter onfleekresources

    (@onfleekresources)

    it also wipes out my woocommerce connection in live.

    bcworks said it before – database changes aren’t able to be “deployed” in the same way that file changes are.

    What you are seeing is what happens to everyone everywhere. If you make changes to anything stored in the database on the live site, it also needs to be replicated on the dev/staging site so that when the database is copied back to the live site it will include that information.

    So far there’s no solution for deployemnt or version control that works with databases like this. Many people have tried, but none have succeeded. The only anser is to make sure that any database changes are done on both sites – that’s the only way that it will ever work.

    Thread Starter onfleekresources

    (@onfleekresources)

    Can you atleast tell me how to deploy without wiping out the user data on the live site?

    Don’t copy the database.

    Seriously, that’s it.

    The only other option is to record exactly what changes you made on the staging stie, snd then re-do all of those changes manually on the live site after the database has been transferred across. This is going to be OK only if no outside actins have taken place (user registrations, comments, etc).

    Like we’ve said, there is no tool that works with databases. Nothing. No one has solved this problem yet. There’s nothing that anyone can do about it.

    Thread Starter onfleekresources

    (@onfleekresources)

    I don’t think I’m using the right words. Sorry. Let’s say I create a new page with elementor in staging. And at the same time a new user signed up on the live site. When i deploy so that this new elementor page appears on the live site, it wipes out that new user profile altogether.

    You are using the right terminology. You are asking the right question. We do understand. It’s just that there is no current tool that can do what you’re asking.

    In your example, if you add a new page on the staging site and want to transfer it to the live site, then you would re-create it in the live site. There’s no “tranfer” of any sort. At most you can cut-and-paste the content into a new page on the live site, but that’s the most that you will be able to do.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Staging Deploy’ is closed to new replies.