CMS & WordPress
I would like to have a desktop PC and a laptop available for development. I am using XAMPP on the desktop which I use as my main workstation, however I'd like to just change location and be able to continue working on the laptop. It seems that it is possible to move the /htdocs folder to Dropbox so the XAMPP instances on both devices would use the same shared folder. That would be a part-solution, what about the question of databases, how would I go about that? I'm sure there are others who work in a similar fashion, so I'd like some pointers on how to set this up properly. Thanks
Why not use one of them as a server computer, and then create a network to allow remote access from other computers. This way you can have everything on one place still access from others.
Are we talking Linux or Windows? I also agree with webcosmo, setting up a server-client relationship would be the best solution for multi-computer setup. The biggest problem you would run into, excluding client-server solution, would be database integrity between 2 computers. Plus, it is very easy to set up a client-server relationship with two personal computers.
Something like http://www.usbwebserver.net/en/ is probably what your looking for. I've never used it myself. I guess it would be a case of saving any work, shutting the server down and then moving the USB stick to the other computer to switch over
The beauty of XAMPP is that it is configured to be used as a full web server. I agree with webcosmo, simply identify one of your machines as the server, and do all af your dev from there. You can further configure access to your files via ftp or a direct share, which you will be able to access from both machines.
That would be ideal if my main desktop is always switched on and I am working from home, but I'd like both computers to be independent of each other, and be able to work from any location with internet access. That's why Dropbox would be very nice. Another alternative I thought about is to use Bitbucket to host files there and then use Git to pull files to each computer. Not sure that would sort the database issue though anyway.
I have used a Dropbox solution similar to the one you mention, and simply drop my dev files into the right location on each machine. This worked great most of the time, but a couple of times there was a connectivity or other issue, and the files didn't get updated on machine #2. As you can imagine, when I started editing on #2 the changes were propagated to #1, overwriting my original updates. Uggh.
Anyway, I finally shelled out the $50 annual fee for a hosting plan on 1and1 (or was it godaddy, or somewhere similar?), which solved most of the problems I was running into. Btw, these plans typically provide git support as well.
For me, I try to develop using the same machine if possible. If I need to work from diff computer then I remote access. Of course, I use SCM but I run all the resources like db's/servers/etc... locally. Many times, I tweak those settings. For these tweaks, it's hard (more of remembering issue) to synchronize these between multiple computers. Anyways, your dropbox sounds like a solution but you won't be able to synchronize completely.. the last thing you want to ask is "It runs on A computer but not on B computer". Another option is to remotely wake the computer. I've never done this but here's a resource link.
I like this solution! Keep everything in USB.
I think copying files across would probably work for you as a first step, for the db you'll just want do something like http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html
However, it's really easier to be working with with source control & db migrations rather than doing these manual steps if you're moving between machines a lot.
For example, here's all I would need to do to update the code and migrate the database using a framework like Rails.
This is a solved problem. What you want to do is use source control, such as subversion, git or mercurial. Work on files on any PC, commit changes, pull updates from the other PC. Also get great features like change tracking, the ability to roll back versions or even the ability to maintain multiple divergent versions in a sane and rational manner.
For the files yes, but for the database? Would you do an export and import each time?
We usually keep a reference backup that travels with the code so we've got something to stand up and test against. When doing most dev work the rows in the database tend not to matter.
This topic is now archived. It is frozen and cannot be changed in any way.