Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I've tried several times to get my head around this but failed everytime!!

I want to setup a working environment for creating websites that is efficient and straight forward to use. It needs to include version control and automatic backups as well as the ability to create and edit files.

The software list I have is:

  1. Coda/Dreamweaver - for file editing.
  2. Transmit - FTP client

The software I'm missing is:

  1. Something for version control.
  2. Something for automatic backups of both the files and database of the websites.
  3. The ability to edit live files rather than FTP them down, edit, then FTP back up again.

Is there anything else that may be useful to include?

Ideally I'd like this as integrated as possible. I may also need some hand holding through the whole process!

The most important aspect is that I'm on a Mac.

Update: One thing I forgot to mention is that I'm running several different sites with a mixture of static html and Wordpress.

UPDATE: After taking Nick's advice I jumped straight in and tried his setup out, haven't looked back since! Amazing.

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

Using Coda, Transmit, Dropbox, and Dropbox's packrat feature, here's what I do:

The workflow

  1. Create a new folder in my local Dropbox directory for each new project.1
  2. Create a new 'Site' in Coda, and set the folder from step 1 as the site's 'Local Root' folder.
  3. Set the 'Remote Root' to the identical folder on the server.
  4. Work on all files locally, and use Coda's 'Publish All' feature to push local file changes to the remote site periodically for testing.

What this gives me

  • Automatic backups of all files to Dropbox with automatic unlimited versioning. (Packrat gives you the unlimited versioning, but the standard 30 day versioning history might be enough for many). Every time I save a file it's automatically saved to Dropbox as a new version. I can rollback any file at any time via the Dropbox Web interface. I rarely use this, but it's nice to have it as it's saved my skin a few times.
  • 'Proper' version control. (Subversion support is now built into Coda, and there are Git plugins.)
  • Two-way syncing with Transmit. If I suspect remote files have changed between edits, I use Transmit's mirroring features to sync remote changes from the server to my local machine. This is not a substitute for using more structured version control for code synchronisation and deployment, but for small projects and one-man jobs, it often suffices.
  • One-window general development with Coda (which supports direct remote file editing without needing to set up a new Site if you need it, as does Transmit.)

From your wishlist, that gives you version control, automatic code backups, and remote file editing if you need it. (For safety I recommend working on the Dropbox-stored local copy and publishing changes to the server from time to time so that you maintain both a local and Dropbox backup automatically.)

What about database backups?

Although I love Navicat for MySQL database tinkering, I've not found a Mac-native automated database backup solution that I've been happy with. You could certainly hack together something using Automator/th3 aw3s0mE p0w3r of Unix, but I don't like to think that essential backups depend on my work machine being switched on (it's a laptop, after all!), so I found another solution.

I use Hostgator's Site Auto Backup. It's a hosted service that lets you backup any website that uses the cPanel control panel (most shared hosting sites) with minimal configuration. It backs up files, databases, emails and logs every day. If your site doesn't use cPanel, it can back up via FTP and MySQL connections directly, which requires only a little more configuration.

Site Auto Backup costs about $20/year if you pay annually, and I think it's worth it for peace of mind. The admin interface could do with a bit of a refresh (see below), but it works as advertised and you can backup any site with it, not just Hostgator ones. There's no limit to the number of sites you can backup -- you just pay for storage over the provided 1GB -- so I backup all my client sites this way too. I don't charge for this as I consider it a basic essential service that's just part of the job, but you could bill clients for the service if you wanted to.

Hostgator's Site Auto Backup


Notes on Dropbox directory structure:

1: I have a single directory in my Dropbox folder called 'Sites', with subdirectories for each project named using the project's domain name: 'theproject.com' or 'beta.theproject.com' etc. If I'm starting a new site, the local site folder will be empty. If I'm working on an existing site, I will download the remote root directory to the local folder. (If I'm working on a WordPress site, I download only the wp-content or themes folder to save time.)

If I have multiple sites hosted on one server, I create several folders locally and several separate Sites in Coda (with the same FTP details).

share|improve this answer
    
Cheers for the comprehensive answer. Are there any free alternatives in the first instance? –  Rob Jul 6 '11 at 13:20
    
@Rob Do you mean free alternatives to Dropbox? It's free for the first 2GB, which includes 30 days of file history (for every file you upload). That's probably enough for storing website code and images, so there's no need to pay for it unless you need more storage or want the Pack-Rat 'unlimited file history' feature. You could also use Apple's iCloud service when that comes out, which apparently may have file versioning too. [Source] –  Nick Jul 6 '11 at 13:24
1  
Yep, Dropbox is the only paying part of the process isn't it? We have 10 or so sites at the moment that I want to include in this whole process, but this will quickly ramp up over the coming months. The one site that I thought would be massive is actually only 74mb so I'm not so worried about exceeding the 2GB limit on the free account. –  Rob Jul 6 '11 at 13:39
    
How can I see the history of changes in Coda? I've opened a file, made an edit, saved/uploaded it. How can I see the previous version of the file? –  Rob Jul 6 '11 at 14:09
    
There's no Dropbox integration for Coda. To see previous versions you can use the Finder. With Dropbox installed on your Mac, second-click the relevant file in your Dropbox directory, then choose 'Dropbox > View Previous Versions' to open the version history viewer in your browser. Screenshot here. Reverting to old files on that page will force Dropbox to resync that file to your Mac. –  Nick Jul 6 '11 at 14:15
show 2 more comments

I recommend Git for your version control and the GUI that I use is "Tower" www.git-tower.com the other one is GitHub mac.github.com.

MacRabbit's Espresso is wonderful (Version 2 is on the way!)

Transmit lets you open a file in you editor, do the edit, then pushes the change up to the site when you save the file. (This is a safer method than just editing a file live.

Hope this helps!

share|improve this answer
add comment

I use MacRabbit's Espresso software, which does most of what you need (it has excellent FTP capabilities built-in). You should give them a look.

For version control, I use Git. I, personally use it from the command line, but there are some nice GUI's for Git out there.

Good luck!

share|improve this answer
    
Cheers. Ideally I'd like to use the software I have, I think it has the features, I just don't know where to start. I've had a look at Git, again, I don't know where to start. –  Rob Jul 6 '11 at 12:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.