2

What is the best way to keep live and staging environments synced with member registrations?

I can export/import the database from the live to staging environment to keep it in sync - and have a content freeze on the live version during development on the staging version.

But the live website will continue to allow new member accounts to be created, meaning the staging environment will be out of sync.

2

You should have a look into project config if you haven't already.

It allows you to sync just the structural changes of your development, staging and live sites, without affecting the content/users.

This way you can still sync your production database to staging, but then you can just sync the structural changes back to production – no freezing necessary.

5
  • Ideally the changes on the staging version would be content as well as structural. For example, I need to create a new section and fill it with content before moving to the live environment.
    – Andrew
    Mar 11 at 11:34
  • 1
    That's understandable. The way I would manage it – and this may not work for you – is to develop the structure locally with dummy/test content, push it live with project config but have it hidden from the front end, then input the content, then launch the new section. The only other way I can recommend is exposing your content on the development site with element api, then using feed me to sync the content in, but that involves quite a lot of setting up depending on the complexity of your content.
    – dmatthams
    Mar 11 at 11:55
  • 1
    Might also be worth checking out this plugin: plugins.craftcms.com/migrationassistant I have not used it however
    – dmatthams
    Mar 11 at 11:58
  • I've marked this as the correct answer, although I appreciate part of it is a work-around. Hope that's OK
    – Andrew
    Mar 11 at 19:02
  • Hey, I don’t mind if you post your solution and mark that as the answer :) I’m interested to hear how you solved this.
    – dmatthams
    Mar 12 at 8:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.