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 wh
I use Capistrano to script & automate the deployment process. Here's an outline of what happens when I enter cap deploy
from my local workstation:
Capistrano will. . .
Checkout latest version of source in a time-stamped directory (e.g. to /var/http/mywebsite.com/releases/20090715014527
) on my webserver, prompting me @ my local workstation for any passwords, if necessary.
Run pre-processing scripts (e.g. update database schema)
Soft link the site to a live directory:
ln -sf /var/http/mywebsite.com/releases/20090715014527 /var/http/mywebsite.com/current
Run post-processing scripts (e.g. maybe you need to restart apache or something)
If there were any problems along the way, Capistrano will rollback to the previous working release.
Although Capistrano is written in Ruby, it can deploy web applications in any language/framework. See the "Deploying non-rails apps" section of the tutorials for ideas. The railsless-deploy seems particularly useful for using Capistrano to manage deploying PHP and Python apps.