Work with Xampp on Dropbox

My need was to have a up to date backup of my projects and have them available at any time and from any place. That ‘s why I tried using xampp on a cloud. Initially I used Live Mesh which I found great, but given that Microsoft is replacing it with the service Skydrive, I had to find an alternative. I tried skydrive but I have abandoned it because it not have a advanced selection of folders (now have also implemented this feature, so it would be to try). I installed Google Drive, but then I had to leave it because it was using too many resources. Very often i saw 55% cpu with 500mb of memory allocated, and the PC turned out to be very slow, so I left Google Drive and installed Dropbox. With this service things have improved considerably and now I use it with satisfaction.

The steps to get xampp on Dropbox in Windows are these:

  • Install Dropbox on your computer
  • Install xampp in a directory in a primary level (ex. c:\xampp). Be careful not to install xampp with the installer but copy the files from the zipped archive.
  • Run the setup-xampp.bat
  • Copy the directory “htdocs” from path “c:\xampp\htdocs” to the Dropbox directory “C:\Users\YOUR NAME\Dropbox\htdocs”. (Replace “YOUR NAME” with your user name!)
  • Create the directory “mysql” in Dropbox.
  • Copy the directory “data” from path “C:\xampp\mysql\data” to the Dropbox directory “C:\Users\YOUR NAME\Dropbox\mysql\data”


  • Now edit the configuration file : “C:\xampp\apache\conf\httpd.conf”
  • Find the code:

DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">

  • replace with:

DocumentRoot "C:/Users/YOUR NAME/Dropbox/htdocs"
<Directory "C:/Users/YOUR NAME/Dropbox/htdocs">

  • Now edit the configuration file: “C:\xampp\apache\conf\extra\httpd-ssl.conf”
  • Find the code:

<VirtualHost _default_:443>
 # General setup for the virtual host
 DocumentRoot "C:/xampp/htdocs"

  • Replace with:

<VirtualHost _default_:443>
# General setup for the virtual host
DocumentRoot "C:/Users/YOUR NAME/Dropbox/htdocs"

  • Now edit the configuration file: “C:\xampp\apache\conf\extra\httpd-xampp.conf”
  • Find the code:

<Directory "C:/xampp/htdocs/xampp">

  • Replace with:

<Directory "C:/Users/YOUR NAME/Dropbox/htdocs/xampp">

  • Now edit the configuration file: “C:\xampp\mysql\bin\my.ini”
  • Find the code:

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


innodb_data_home_dir = "C:/xampp/mysql/data"
innodb_log_group_home_dir = "C:/xampp/mysql/data"
#innodb_log_arch_dir = "C:/xampp/mysql/data"

  • Replace with:

datadir = "C:/Users/YOUR NAME/Dropbox/mysql/data"


innodb_data_home_dir = "C:/Users/YOUR NAME/Dropbox/mysql/data"
innodb_log_group_home_dir = "C:/Users/YOUR NAME/Dropbox/mysql/data"
#innodb_log_arch_dir = "C:/Users/YOUR NAME/Dropbox/mysql/data"

Now everything is ready to work.

If you already have an installation of xampp on pc performed by an installer, may not be sufficient to move the xampp directory and run the setup from the new dir, because there are the registry keys that do not update, so you have to proceed as follows:

  • First step: Backup your xampp directory! precaution…
  • Export all of your mysql database, taking care not to also export the system databases, or when you import the new installation will give you error. The databases do NOT export are:


  • copy all the projects of your htdocs directory on a temporary
  • Uninstall xampp and reboot the PC.
  • now begin to install xampp as initially described, and then copy your htdocs in the new installation.
  • Go into phpmyadmin and then import the previously exported database.


Some tips:

  • Be sure to install the same version of xampp on each pc.
  • Be sure to install xampp from the zip file and not by the installer.
  • Be sure to close apache and mysql process before switch to another computer.
  • When you start the computer, before you start working on xampp, waiting for Dropbox has finished sync files.
  • After each change to your project, and after closing xampp, waiting for Dropbox has finished sync files before switch to another computer.
  • I have tested this guide to Win7 and Win8.1 and everything is working fine. If you have some problem, ask through comments, but first check and double check all the steps listed above.


And good job.

23 thoughts on “Work with Xampp on Dropbox

  1. This is extremely helpful. But I had installed xampp with the installer and had it working before I got the idea of putting htdocs inside Dropbox. So I need to uninstall it per your instructions. I have two questions, if you would be so kind.

    1. Is that alist of mysql files NOT to export? I can’t quite tell what you mean by this sentence: ” The database does not export these are”

    2. I used Xcopy to copy the whole existing C:\xampp directory to an external drive. Do I still have to export some of the mysql stuff, or after uninstalling xampp, can I just copy everything back to C:\xampp, and let that be my re-installation?

    • Hi, I try to answer your questions:
      1: The list of databases do not export, are listed in the image of the post. Practically NOT to export “cdcol, information_schema, mysql, performance_schema, phpmyadmin, test, webauth.” The databases to be exported are those that you created for your projects.
      2: When you uninstall Xampp, then you have to re-install without installer, but with the compressed file to unzip as described at the beginning of the post. Then you can copy your old folder “htdocs” (your projects) in the dropbox dir, while the “data” directory you should move from the new c:\xampp in the dropbox dir, then go into phpmyadmin and import your previously exported database. Try it and let me know if you are successful.

  2. Very helpful post, thanks.
    I have a Q.

    It seems to work all fine with dropbox and xampp although when I go to xampps security i get errors:

    Warning: fopen(..\..\htdocs\\\\xampp\.modell): failed to open stream: No such file or directory in E:\xampp\security\htdocs\security.php on line 186

    Warning: filesize(): stat failed for ..\..\htdocs\\\\xampp\.modell in E:\xampp\security\htdocs\security.php on line 187

    Warning: fread() expects parameter 1 to be resource, boolean given in E:\xampp\security\htdocs\security.php on line 187

    Warning: fclose() expects parameter 1 to be resource, boolean given in E:\xampp\security\htdocs\security.php on line 188

    E:/xampp is the drive that I copied the xampp zipfile. I cant find the file where I need to edit the directory.

    Thanks again.


      • Yeah I did all the steps. Double checked. I installed Xampp on my laptopt and have the exact same problem. My guess it might have something to with the fact that I had xampp installed on both my computers before starting this operation.
        I uninstalled, deletetd dirs and cleaned registry (with a standard registry cleaner app) and finelly rebooted my computers before I started though..

    • Ok, try to create the directory “htdocs” in your xampp installation dir, and copy the following dir that you’ve moved in dropbox htdocs: “forbidden”; “restricted”; “xampp” and the files: “apache_pb.gif”; “apache_pb.png”; “apache_pb2.gif”; “apache_pb2.png”; “apache_pb2_ani.gif”; “favicon.ico”; “index.html”; “index.php”.
      I noticed that if you delete these files from the xampp directory, you can find some errors.

  3. Hi, I tried this setup. But how to I open the PHP project now.
    Ex: if I have a project Test in htdocs normally we open it with URl- localhost/Test.
    After making these changes I am getting the following error when I try the above mentioned URL.
    Object not found!

    The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

    If you think this is a server error, please contact the webmaster.

    Error 404

    Apache/2.4.9 (Win32) OpenSSL/1.0.1g PHP/5.5.11

    • I’m getting this error. It’s possibly because I’m trying to access my test site from different machines.

      So I got it setup on my work PC which as the DropBox folder within /users/mc02

      Then I followed the instructions on my home PC which has the DropBox folder within /users/Mark/

      Now when I go back to my work computer I get this error when trying to access a post on a WordPress install.

      Could it be because 2 different installs of XAMPP are trying to connect to the same site? Any solution to this?

  4. Hi quick question. Say I transfer the wordpress files into my theme folder via the drag and drop on my computer. Do I have to wait for all folders and files to have the green synced check mark before continuing each time?

    • Hi, if you transferred your files in the Dropbox folder, you can continue to work without worrying about synchronization. Obviously if you turn off your computer before synchronization has finished, your data in the cloud will not be updated.

  5. Hi, is there a way to sync via FTP/SFTP or any other way also with Linux web server? How it works, I mean for example if there’s table in MySQL called “test” with content:

    name value comment
    — — —-
    color red warm
    amount 3 no comments

    And if I change from my PC in XAMPP red->green but someone else changes online in Linux server warm->cold then it should sync both updates to all PCs and also in hosting server.

Leave a Reply