How should I move my code from dev to production?

Posted by Teddy on Stack Overflow See other posts from Stack Overflow or by Teddy
Published on 2009-11-02T22:42:53Z Indexed on 2010/04/29 15:57 UTC
Read the original article Hit count: 308

I have created a PHP web-application.

I have 3 environments: DEV, TEST, PROD.

What's a good tool / business practice for me to move my PHP web-application code from DEV to TEST to the PROD environment?

Realizing that my TEST environment still only connects to my TEST database; whereas, I need to PROD environment to connect to my PROD database. So the code is mostly the same, except that I need to change my TEST code once moved into PROD to connect to the PROD database and not TEST database.

I've heard of people taking down Apache in such away that it doesn't allow new connections and once all the existing connections are idle it simply brings down the web server.

Then people manually copy the code and then manually update the config files of the PHP application to also point to the PROD instance.

That seems terribly dangerous.

Does a best practice exists?

© Stack Overflow or respective owner

Related posts about sdlc

Related posts about custom-code