HOWTO: Drupal Staging

I've recently begun to work with a larger company who requires me to work on a development server, then push those changes to a staging server and finally once everything is working perfect, move those changes to the live site. All this in the past has been fine for me, and it follow my old normal flow of development. I develop on my laptop, push those to my own server to demo and once everything is okay'd I finally install the product on the clients server. The issue here, is that they've already had their sites live for a couple years. The development version could have been pulled down a couple months ago and there will significant servers between that and the live version. So what's the Drupal solution for this? Quick answer: there's no easy way to do it. Long answer: it can kind of be done if you're willing to add layers of complexity.

Drupal Staging when you don't have to worry about the live database

If you don't have to worry about the live database, moving a Drupal install from one server to another is easy breazy. I use a combination of the backup and migrate module and sub version (or your fave version control system). These days I've been playing with backup and migrate version 2.x. It's not quite as quick to setup, but it appears to be a bunch more configurable and the different export modules will make it worth wild. What I do is create a backup and migrate profile to save the database dump to my file folder with out a timestamp. I usually change the filename from [site-name] to my actual site domain like domain-tld because if my site-name changes, I don't want another file created...and then I create the backup and add it into SVN. I selectively choose the other files I want to backup to port over and commit those. I ssh my way over the the new server and pull down my SVN and create and import the database from the backup and migrate dump. I log in as Drupal's super user and clear the cache. Usually that's enough to get everything to work.

Drupal Staging when you have to merge the live and development databases

I'll get into this further when I have time...but the short answer is export changes into code & run those changes with module updates in the the .install files.