Using Subversion for web development

Subversion has been removed from the DreamHost panel. If you had previously configured Subversion on your domain, it will continue to function normally.

Overview

Subversion lets you use version control for web development. After importing your files to the repository, set up a separate development area and a live area to take advantage of it.

For example:

  1. Log into your server via SSH.
  2. Back up your site by running the following command:

    [server]$ tar -cvf yourwebsite.tar example.com/
  3. Check out your repository to your development area:

    [server]$ svn checkout svn+ssh://username@example.com/home/username/svn/yourProject ~/dev.example.com
  4. Check out your repository to your live area:

    [server]$ svn checkout svn+ssh://username@example.com/home/username/svn/yourProject ~/example.com

How do I publish from Dev to Live?

Using your dev site at dev.example.com, you can now make any necessary changes. Once all the changes are complete in your Dev area, you can then make them Live.

  1. Go to your dev directory:

    [server]$ cd dev.example.com
  2. Commit your changes:

    [server]$ svn commit -m "Your change log notes"
  3. Go to your live directory:

    [server]$ cd ~/example.com
  4. Update the Live site:

    [server]$ svn update

You may see the following error when updating from your dev site:

Conflict discovered in <filename>
Select: (p) postpone, (df) diff-full, (e) edit,
        (mc) mine-conflict, (tc) theirs-conflict,
        (s) show all options:

If you type in the letters tc and click 'Enter' on your keyboard, all changes made in your Dev site are updated to your Live site. View the following page for further details:

Your changes are now live.

See also

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?