What is your preferred php deployment strategy? [closed]

For PHP, SVN with Phing build scripts are the way to go. Phing is similar to ANT but is written in PHP, which makes it much easier for PHP developers to modify for their needs.

Our deployment routine is as follows:

  • Everyone develops on the same local server at work, every developer has a checkout on his machine back home as well.
  • Commits trigger a post-commit hook which updates a staging server.
  • Tests are ran on staging server, if they pass – continue.
  • Phing build script is ran:
  • Takes down production server, switching the domain to an “Under construction” page
  • Runs SVN update on production checkout
  • Runs schema deltas script
  • Runs tests
  • If tests fail – run rollback script
  • If tests pass, server routes back to production checkout

There’s also phpUnderControl, which is a Continuous Integration server. I didn’t find it very useful for web projects to be honest.

Leave a Comment