Developing sites locally across several machines...

Discussion in 'HTML & Website Design' started by TomHayes, Nov 5, 2013.

  1. #1
    Hi guys,

    I've been stumped as to how to approach the issue of developing across several computers, after reading several times that working on sites live is poor practice and I should avoid doing so. I'm a fairly inexperienced web designer working mainly with WordPress, and I'd just like to get my workflow straight before going any further...

    My issue is that I work on websites on 3 different computers: my work computer (iMac), my home computer (Windows 8) and also my Laptop (Windows 7). I am struggling to determine a way of working that allows me to develop locally across these 3 machines. So far, I have worked out these 3 possible methods:

    1. DropBox: I could potentially sync the htdocs folder across the three computers using DropBox. This poses an issue though because one of my computers is OSX, which uses MAMP, and my other 2 both utilise WAMP. I would also have to sync the database folders - this is quickly going to eat up space in my DropBox!
    2. WAMP Portable: I could install WAMP portable on a USB drive, and plug that in to access my sites. Obviously this poses the same problem: not being compatible with OSX, and having to have the USB stick on me at all times I wanted to work on a site could pose problematic - not to mention if I lost it!
    3. Git: lastly, I could use a Git repository to sync the site across the 3 machines (I think!). However, after reading up on Git, I still feel none the wiser, and can't help but feel this is intended for real software development and not for building a few WordPress sites - there must be a more eloquent solution!
    So am I missing something here? If so, what? If not, which option should I go for?

    Thanks for taking the time to read this, looking forward to seeing your suggestions!
     
    TomHayes, Nov 5, 2013 IP
  2. wvccboy

    wvccboy Notable Member

    Messages:
    2,632
    Likes Received:
    81
    Best Answers:
    1
    Trophy Points:
    250
    #2
    I have a number of PCs that I use for developing on for the same projects. My configuration is as follows:
    1. I am using a remote GIT repository that I pull from and push to when I finish coding on a PC. Whether you're using it for one file or for a full-blown project, GIT helps keep track of revisions and ensures I have the same code across my computers when I'm developing.
    2. In addition to my GIT repository, I need a way of testing my website code. So I either run a WAMP/LAMP as you described and run my site on there, or I set up a web hosting account and upload to FTP as I code and save my changes so I can test my code live without working on the code in real-time. In my case, if I make a mistake, I can use GIT to revert to a previous revision and repeat this process.
    I personally would not recommend a USB stick, and as you mentioned, it could be problematic if you lost it or the files got corrupted. DropBox isn't a bad idea, since you can revert to older versions and everything is in the cloud. However, having your code in GIT is much easier for comparing and reviewing code if needed.

    Hope this is helpful, and good luck!
     
    wvccboy, Nov 5, 2013 IP
  3. BANAGO

    BANAGO Active Member

    Messages:
    456
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    58
    #3
    I have similar needs as you are describing. And I've solved it with Git and PHPloy. I have a central server where I host the Git repositories where my and my co-developers pull push to stay up-to-date with each other's work and each of us makes use of PHPloy, which in tandem with Git, knows which files where changed and deploys them them the the destination server through FTP.

    I'm very happy with this setup and I recommend it for you too. In your case, getting the latest version of your work on the other computers is a matter of git pull.
     
    BANAGO, Feb 13, 2014 IP