I should preface this by saying two things.
1. I deserve no credit for coming up with this stuff. My understanding of
Mac OS X’s Terminal is minimal to say the least. I just sort of smooshed some useful information together.
2. If you’re PC user, you’re out of luck; this only covers Macs. I realise this may annoy some people so if there’s enough righteous indignation (read: if anyone actually finds this useful), I may see if I can find out how to get this set up on a PC. It’ll take a lot of indignation though…
Right then, if you don’t already know how to set up a local testing environment the coolest guy on the planet (thanks and everything man but seriously, that’s the name of your site?…), has what is by far the best guide I found for doing just that. Go and read it if you haven’t already got it working. Personally I have a irrational distrust of pre-packaged software that serves this type of purpose so I didn’t want to install MAMP or XAMPP or any of the similar alternatives…
(One small note which may save you some time. If you set up phpMyAdmin, you may be tempted to change the name of the user for config auth from ‘root’ to something else. Don’t do that, at least unless you know what you’re doing..which I don’t).
With that done, you should be ready to work with your test environment. However, if you’re a Dropbox lover like myself, you’ll want to be able to sync the changes made on your local server with Dropbox.
Thankfully this is quite simple.
Open Terminal (found in Applications/Utilities/Terminal), and paste the following:
ln -s ~/Sites/Path/To/The/Folder/ ~/Dropbox/Path/To/Location/In/Dropbox
(Hopefully it goes without saying that you’ll need to change the paths. If the folder contained in your ‘~/Dropbox/….’ bit doesn’t exist, it will be created). Just to be super clear, the original folder with all the files is stored in ‘Sites’ and the copy is created in your Dropbox folder.
That’s it! Now, changes made in whatever location in your ‘Sites’ folder you specified will automagically be uploaded to Dropbox. Hooray!