We are a team of 3 developers and till date for the php project, we were building a site on a production/live site. Not the best way, I know. We created a testing area/folder in the live site and were testing it live. For instance - www.xyz.com/testing/abc.php
For a source control we are using Subversion.
Now we have set up a testing/development site, so my question is, what is the best way to manage both testing/development and production/live site.
At the moment I can only think of two ways -
Firstly, every developer gets a copy of exact duplicate code of the live site for testing(under testing site). They write code, test it and if it's all working, copy the code across to the live site and check in to subversion.
Every Monday, one of us copy the latest live code to the testing server and we repeat the process every week.
The second way is, that each developer just write a code in testing site, check inn the code to subversion and one of us just copy the test site code to live site once a week.
I am not really convinced by the above process, as I want to automate the process. Both the method, can be quite cumbersome and error prone. How do you manage your test and production site? There must be a better way.
We are using -
Subversion, dreamweaver(php/zend framework), Shared hosting
Thanks a lot