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:
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 ?
I recommend leveraging SVN export instead of checkout. This way, you will not expose any of the SVN files to the world. It also generally creates a cleaner folder structure.
I have leveraged rsync before when moving files between stage and production.
My typical deployment proceeds as follows:
Now, to deploy to production, replay these steps in fast forward. Using scripts make it much easier.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With