I don't really know how to perform deployment from offline development to live webserver correctly in web development. I mostly resort on intuition, but this is more or less what I did until now: I have a web application in python, or php, and I am hosting it on a live webserver. I use an offline development version whose source is under svn.
Now, as I develop the offline version, I will perform commits to the svn. When time has come for release, I could either:
- copy the code from the offline server to a temporary directory on the live webserver, then swap the old codebase with the new one (eg. with a link), or...
- have the live webserver work on a checkout svn, and just run svn update.
I normally do the second, although if I have to upgrade the database before the live deployment, I normally write upgrade sql scripts, and run them first on the live database, then checkout.
What are the best practices for this task ?