Wamp Server + Dropbox (Sync PHP file and MySQL Database)
Synching your files
1. Setup and install Wamp Server.
2. Create 2 folders in your Dropbox account: www and database.
3. Left click on your WAMP icon, scroll over Apache and click on httpd.conf file.
4. Locate the DocumentRoot declaration around line 230. You will see this:
Change the path to the ‘www’ folder you created within your Dropbox storage in step #2. Always use forward slashes here and include the trailing slash at the end. Save the file and close the document. This will now point all http web requests to the new Dropbox-based ‘www’ location. My line appears as:
5. After this line and past the first <Directory /> clause, you will see another <Directory…> entry around line 252 with the original ‘www’ path within it.
Change this line to match the same as entered for the DocumentRoot above:
6. Locate the config.inc.php file
Open it and locate this line
$wwwDir = $c_installDir.'/www';
Change it to
$wwwDir = 'C:/Users/nickg/Dropbox/PRIVATE/WAMP/www';
This will update the quick-access shortcut from the WAMP icon to open your web directory contents.
7. Left click on your WAMP icon, scroll over Apache and click on httpd-vhosts.conf file.
8. Change these 2 lines:
DocumentRoot "C:/Users/nickg/Dropbox/PRIVATE/WAMP/www" <Directory "C:/Users/nickg/Dropbox/PRIVATE/WAMP/www/">
9. Copy all of the contents of the wamp\www directory to the ‘www’ directory created in the Dropbox storage folder. In particular, copy the folder below:
As well as these files
add_vhost.php favicon.ico index.php test_sockets.php testmysql.php
8. Open the copied ‘index.php’ file from the ‘www’ Dropbox folder in a plain text editor. Change the $server_dir variable around line 40 to reflect your root WAMP install. Save the file and exit. This will enable you to access the default WAMP index page with quick access to useful tools like phpMyAdmin and general server information.
$server_dir = "C:/wamp64/";
9. In case you have installed a local SSL certificate as explained here, then you must do one more step in order for this to work. Open this file
10. Change the following line
11. Restart wamp server and enter localhost in your chrome and see that it works as expected.