Okay, so I have a client who wants minimal down-time so he wants me to set up and configure his new Drupal site on my own servers and then "move" them to his site when they're done...

Any tips, advice, or tutorials you could offer?

It would be easier if he wanted to use my hosting services, but he wants to keep his previous web host.


chriso’s picture

Have your client create a staging environment for you on their intended production host, or something identical to it. You'll want Apache, MySQL and PHP configurations to match the eventual Production perfectly.

Once you've isolated those settings, replicate that as far as possible locally, in a VM if you have to. Watch out for enabled Apache modules, PHP version and php.ini settings like memory_limit in particular.

Expect to publish and test iteratively into that Staging environment until it's stable. Keep publishing code/db into it (drush rsync, drush sql-sync, even drush archive-backup and archive-restore are handy here -- set up Drush aliases early so you don't go insane).

If it's on a public-facing host alongside their existing stuff, consider HTTP authentication (or look into Shield module) to keep people from stumbling into it.

Keep in mind the risks of not load testing if you don't spin it up on equivalent hardware and thrash it before launch.

Make the final cutover something completely simple and reversible like tweaking the domain in front of the staging area via their host's control panel, so there are no surprises. Client and you should be comfortable that the eventual Production site is running hidden-but-stable, well in advance of the public getting near it.

poobalu’s picture

Step one: Do the development (on your home pc) on your environment (Try and match the development environment with production environment – if is it windows use XAMPP).
Ones all the development completed, take back up of the database and files.

Step two: Create a sub domain of the production site domain and point that to a sub-folder with in the production site (for example: www.example.com/dev - so that dev.example.com points it to the dev folder)
Copy all the back up drupal files from step one to the new dev folder.
Create a database and using the database dumps you got it in step one.

NOTE: In this way any (version) issue can be solved with out down time (plus you can ask you clients to test and populate the site)

Step three: You can just replace the production file with the dev files.

Useful stuff:


Back up and Restore Database from the Command Prompt:
mysqldump -u user_name -p your_password database_name --single-transaction > /home/www/ file_name.sql

mysql - u user_name -p your_password database_name < file_name.sql

naziaali’s picture

Great effort.Keep it up.