Sync XAMPP Data With Dropbox

I use XAMPP for my local website development environment. It’s a wonderful free tool to use for this purpose, since I need access to a local WordPress distribution and the associated MySQL database to experiment with with themes and plugins.

One challenge I faced had to do with the fact that I use three different computers for development activities. Keeping data in sync across these platforms is important to me. The natural solution is to install Dropbox (referral link) on my various machines. (If you’re not familiar with Dropbox, be sure to read about maximizing free space before installing it.)

To be clear about what I set out to accomplish, I wanted to sync (A) my local web pages; and (B) the MySQL database across multiple machines. I did not want to sync the entire XAMPP distribution with all of its binaries. It is not difficult to make this work correctly, but it does require modifying a couple of configuration files.

Before we begin, I will assume you have XAMPP successfully installed and running on multiple machines independently (successfully running the HTTP server and MySQL database components). Our goal, then, is to make all of your installations access a single directory structure within Dropbox. A word of caution with all projects of this sort is that you should backup all of your data before making changes to your configuration files.

For my setup, the directory in which XAMPP is installed happens to be the same on all of my machines. Similarly, the directory in which my Dropbox folder is located is the same across all machines. This is not a requirement to make this work, but you may need to keep this in mind if your setup is different. My folder locations are:

XAMPP Installation =   C:\xampp

Dropbox Location   =   C:\Users\Patrick\Dropbox

Step 1 – Create web page directory in Dropbox folder. The first thing you need to do is set up a directory in your Dropbox folder to hold your web pages (HTML, PHP, etc.). For this example, I will create a folder named “C:\Users\Patrick\Dropbox\web-content”.

Step 2 – Change XAMPP configuration to point at this folder. There are two variables that need to be modified in the XAMPP configuration file. Edit “C:\xampp\apache\conf\httpd.conf” and modify DocumentRoot and Directory so they point to the new folder inside of Dropbox. For my setup, it looked like this:

OLD ENTRIES (search for them in "httpd.conf"):

    DocumentRoot "C:/xampp/htdocs"

    <Directory "C:/xampp/htdocs">

NEW ENTRIES (change lines above to this):

    DocumentRoot "C:/Users/Patrick/Dropbox/web-content"

    <Directory "C:/Users/Patrick/Dropbox/web-content">

Step 3 – Restart Apache and test. From the XAMPP control panel, stop and restart the Apache server. Create a file named “test.html” inside of your new Dropbox/web-content folder. Open “http://localhost/test.html” in your favorite browser, and you should see the contents of your test.html file.

Step 4 – Sync Dropbox across machines, and modify other configuration files. At this point, it should be easy to make your other computers access the same Dropbox folder. Go to your other machines and edit the “httpd.conf” file in the same was as you did on the first machine. If your Dropbox folder or XAMPP installations are located in different places than they were on your first computer, adjust directory names accordingly.

If you don’t need MySQL support for your development efforts, you can stop here. If you want to use something like WordPress, or another package that requires MySQL, continue with the rest of this process.

Step 5 – Turn off the MySQL server. Before moving things around, make sure the MySQL server is turned off from the XAMPP control panel.

Step 6 – Copy MySQL database into Dropbox. From your first machine, locate the directory containing the actual MySQL database. Copy that directory in its entirety to Dropbox. In my case, I simply had to copy the folder “C:\xampp\mysql\data” to “C:\Users\Patrick\Dropbox\web-database”.

Step 7 – Modify the MySQL configuration file. Edit the file “C:\xampp\mysql\bin\my.ini” and modify three variables to point at the new database folder inside of Dropbox.

OLD ENTRIES (search for them in "my.ini"):


    innodb_data_home_dir = "C:/xampp/mysql/data"

    innodb_log_group_home_dir = "C:/xampp/mysql/data"

NEW ENTRIES (change lines above to this):


    innodb_data_home_dir = "C:/Users/Patrick/Dropbox/web-database"

    innodb_log_group_home_dir = "C:/Users/Patrick/Dropbox/web-database" 

Step 8 – Restart the MySQL server and test. Restart the MySQL server and make sure everything is working as it was before.

Step 9 – Modify MYSQL configuration on other machines. Finally, make the same changes to the “my.ini” file on your other machines.

That should be it! A word of caution, though, is that these files should never be modified on more than one machine at a time. And more importantly, the MySQL server should only be running on one machine at a time. Conflicts from multiple active MySQL servers would likely wreak havoc.

Good luck!

Dropbox (Maximizing Free Storage)

If you would like to maximize free storage on Dropbox (referral link), there are four things you need to know. First, set up your account through a friend’s referral. Second, complete five of their “Getting Started” steps. Third, link your Dropbox account to Twitter and Facebook. And finally, leverage their referral mechanism to the fullest extent possible (understanding protections against “scamming” the system)!

Dropbox is a cloud-based storage service that appears as a special folder on your computers. Whatever gets placed in that folder is automatically synced with your other computers. Change a document on one computer, and those modifications are automatically distributed to all other computers. It works with Windows, Mac, iPad, iPhone, and Android. Plus it provides web-page access to your files so you can get to them anywhere you need to! I cannot emphasize enough how clean and useful the interface is. This is, in my opinion, an absolute MUST HAVE application.

Everyone who signs up automatically gets 2GB of free storage. For a very large number of users, this will be plenty of space to share documents and photos on multiple computers (they can even be shared with other people, but that’s another topic). Need more space? Dropbox offers paid subscriptions for 50GB and 100GB folders. Most of us, though, whether we need it or not, are interested in every last drop of free space that we can possibly get. And the folks at Dropbox provide us several ways to increase our free storage! Some of these are well-publicized, while others are not. Here is what you need to know.

Initial Referral – If you have not already set up a Dropbox account, start by getting a referral link from one of your friends (or use the one here, if you have found this article useful). The business model at Dropbox leverages referrals heavily, and when you are referred by a friend, BOTH OF YOU get 256MB of additional storage added to your free account!

Getting Started – When you set up your account, Dropbox will provide a seven-item “to-do” list on their “Getting Started” page. These are simple items like “Take the Dropbox tour” and “Put files in your Dropbox folder”. Complete five of these and they reward you with another 256MB in your account.

Social Media – For some reason, this one doesn’t appear to be well publicized. Go to the page https://www.dropbox.com/free and you will be presented with an opportunity to link your Drobox account to Facebook and Twitter. Complete all items and you are rewarded with another 640 MB of space. On a side note, once you are awarded the space, you can “unlink” your accounts from Dropbox and the new space remains intact.

Provide Referrals – and back to the referrals. Now they would like you to recruit people, and for every new customer, again, you both get 256MB of additional space. You can be rewarded for up to 32 referrals, resulting in a whopping 8GB of additional free space!

… and for the “Hackers” out there …

I know full well that a lot of people immediately thought to themselves, “well, heck, I will just set up 32 new email addresses and send referrals to those!” Nice try, but they’re looking for that. Your references actually need to install the Dropbox client on their computers for you to get the credit. “No problem, you say, I will just uninstall my current client and install it again with the new email address!” Wrong, again, Dropbox is pretty good at detecting when two installations occur on the same computer… and they will mark the referral “ineligible”.


Presumably, if you are installing Dropbox, it is because you have more than one computer to install it on. If this is the case, there is one thing you can do.  After you have finished installing Dropbox on your “primary” computer, for each additional computer you would like to install Dropbox on, DO NOT INSTALL DROPBOX WITH YOUR ORIGINAL CREDENTIALS. Instead, you can send a referral to a secondary email address, and set up that computer with the REFERRAL credentials. Once that is complete, both accounts are credited with 256MB of free space.

The problem now is that your two computers are not sharing the same Dropbox space which was the original point to all of this. Once you have installed Dropbox on your secondary computer with your secondary credentials, you should unlink the secondary installation from the secondary account, and re-link that installation to your primary account. This can be done by opening the Dropbox client on your secondary computer, selecting “Preferences”, and then “Account” from the menus.

I should point out that I don’t necessarily condone “scamming” the system with a huge number of extraneous installations. After all, Dropbox has a business to run and they are providing a wonderful service. So once you have completed getting your own account set up, if you do indeed like the service, start recruiting. And in the process, getting more free space. 🙂

If you have found this article useful at all, please consider using my referral link for Dropbox to get started.

(Sorry, gang, every time a new article is posted about Dropbox, the comments are flooded with referral links.  These will be deleted to keep it manageable.  Thanks for understanding.)