Nerd Business

5
Jul
2010

Sync Your Drupal Sites with XAMPP and Dropbox

Dropbox is a sweet little tool. I first tried it during a Startup Weekend event; when a teammate suggested we use it to share access to our little project.

Since then, I've found it to be an essential app. And it's particularly useful for working with Drupal. Specifically: for syncing local Drupal sites across multiple systems. And for sharing access to said Drupal sites with other developers.

So here's a quick guide on how to setup a really slick Drupal testing environment. One that will sync across multiple systems and enable quick access for your development partners.

 

Integrating XAMPP and Dropbox

First thing's first: you'll need a local server. And the easiest way to get an apache server setup is to use XAMPP.

Once you have XAMPP installed, the key to making it integrate with your Dropbox - is to change the default path of your "htdocs" directory to a folder within your Dropbox account.

By default, the file to modify is located at "xampp\apache\conf\httpd.conf". Then find the line called "DocumentRoot" and change it to something such as "C:/My Dropbox/htdocs". And a few lines down there is another entry called <Directory "..."> that you will need to update with the same path. Done!


Syncing your Drupal databases

You'll run into potential problems if you use Dropbox to sync your MySQL - so the best way to sync your Drupal databases across multiple systems is to use MySQL replication. I found a simple guide on how to setup MySQL replication here.