1

Does anyone have any advice on how to deal with separate databases (local, staging, live) for the same EE site on different servers?

The client changes things on live, but I obviously do any site maintenance or updates from my local > staging versions. I've accidentally overridden the client's changes to the live site before. Any advice on how to avoid this with a module that checks database changes, or even a way to block certain sections of the database from being overridden on import? (like say, any tables dealing with members)

I was looking at Site Manager on github but it is currently in Alpha, so unsure when it can actually be used in production. I have Zenbu installed to check entry edit dates, but no idea how to check for changes elsewhere.

2
  • 2
    What changes does the client do? only entries and uploads, or do they also change channel fields etc. ? edit: see also this SE question: expressionengine.stackexchange.com/questions/45/…
    – GDmac
    Dec 12, 2012 at 20:53
  • They have access to everything from member profiles to entries...they are a super admin because of the level of editing they required.
    – Alexa L
    Dec 13, 2012 at 20:56

2 Answers 2

2

You'll find a lot of great info at Migrating between Development, Staging and Production for a pre-existing ExpressionEngine site

As mentioned in one of the answers, remember that content should flow from PROD => STAGE => LOCAL and code should migrate from LOCAL => STAGE => PROD.

I have a similar workflow where I work on everything locally and migrate to staging before production. In most cases I'm able to ask the client for a content freeze while I make quick updates to their site locally, have them review on staging, and then migrate them live.

In cases where content freezes aren't possible, and the edits require more than just template updates, then I sometimes add the add-on/channel(s)/channel field(s)/categories/etc by hand on live after hours so not to overwrite the whole DB. Luckily this is pretty rare and I have been using SiteManager a lot for this. It works great!

1
  • When Site Manager gets out of Alpha, I will definitely be trying it in production. Content freezes are usually possible if it takes 1-2 days for a change, but generally I've had to do things by hand like you mentioned. Luckily right now, I handle content editing for most of our sites, but a few of them I've been trying to figure out how to safely do things, because I can't work after-hours to make changes.
    – Alexa L
    Dec 18, 2012 at 0:49
1

It does depend on what sort of changes you're making, but one possibility is to connect to the staging or production database from your local installation.

This has the advantage of giving you access to all the latest data that's been created by clients.

But it also means that you might be editing templates on a live site. If you're working on completely new sections with new template groups, or new templates within existing groups, this isn't such a problem.

But if you're doing work that involves structural changes to database tables, then this isn't really an option. Like I said at the start: it all depends on what sort of updates you need to make.

1
  • I'm definitely going to be connecting my local databases to staging from now on, then files will be pushed through git. Thanks for the idea!
    – Alexa L
    Dec 18, 2012 at 0:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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