1

Recently I have created a PHP/MYSQL based website, site is going to be live in next few weeks, my mentor asked me to setup a dev site and a live site, make changes & testing for new features on dev and then upload them to live.

I can do that but that seems a hard process because I'll make changes here and will upload them manually to live server. There are chances that I'll miss some files or dependencies, while uploading.

I thought to have a SVN kind of facility which will manage the dev and live server synchronization. In case I'll miss any files it will highlight me that this file is not yet synchronized on live etc. Also it will maintain the versions of my live and dev site on daily basis, in case anything goes wrong, we can get the earlier versions.

I am not fully aware with what is SVN, how to setup it and how to use it. Could you guys, please guide me how to setup it and how to use it. Which SVN software will be good.

My Server configs are: its a LAMP facility (Ubuntu) I am using Windows as a local system to make changes (dreamwaver cs5) and upload them to FTP.

Thanks.

2
  • You don't use SVN or another version control system? Using one is essential to development and I would recommend one for so many reasons. You'll probably get loads of people telling you SVN is rubbish and you should use something else. The thing is, using any version control system is miles better than using none. By all means have a look at other systems but if you go with SVN in the end that's fine. As for tutorials or getting started guides to SVN, google should point you to tons. Commented Feb 15, 2011 at 8:43
  • I suggest you also use something like beanstalkapp or springloops as it will make your life more hassle free. imho, it is always best to outsource things which are not your core. spend time programming, everything else, let third-party-tools handle. Commented Feb 15, 2011 at 8:47

2 Answers 2

2

I have a similar configuration to manage dev, staging and deploy for many clients. We still use SVN because it's largerly supported natively and it's also integrated on simple developer tools such as CODA (we're also working with GIT but we plan to move the web app deployment on GIT as soon as it will be integrated in that kind of editors).

On the client side (developers side) you can use any SVN visual client like Versions (OSX).

On the server side, we developed a custom php application to take control of each working copy on the server and run new updates SVNDeploy otherwise you can just ssh on the server and run your custom update.

If you will follow the SVN suggested repositoy structure

/tags
/trunk
/branches

You can easly manage your deployment in this way:

  • Current release in the /trunk folder
  • Development snapshots under /branches (like /branches/2.0-dev etc.)
  • Old released versions under /tags (like /tags/1.0, /tags/1.5 etc.)

We used that configuration in the last 3 years with 5 servers and around 25 developers and it worked fine since now.

Some useful links to configure your own subversion server:
http://svn-ref.assembla.com/subversion-server-guide-mac-os.html
http://aymanh.com/subversion-a-quick-tutorial

Sign up to request clarification or add additional context in comments.

3 Comments

I would also add some tool like hudson to get continuos integration which will made control and synchronization easier
I am not testing the applictaion on local system. I am making changes, uploading it to server and then checking that changes are done or not. Will your scenario work in that environment, where I will make changes on local, upload them to dev (branches) test them on dev and then synchronize them with LIVE server?
Yes it will work. Just work on your local system. Then commit your changes to the SVN repo and update your integration(dev) server to check your stuff. if they're all OK, just update the live environment.
0

Take a look at Mercurial.

There are several videos on YouTube that you can watch to get a feeling for what Mercurial is all about. (Start here.)

2 Comments

I'm a big fan of Mercurial, but I think it's easier to start with SVN than Mercurial.
I disagree. The only advantage of SVN is that it's been around longer and is therefore understood by more people. If you're not familiar with either, then there will be a learning curve regardless of which way you go.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.