Does anybody have a development/staging/deploying workflow with php/mysql?

Zoran Zaric picture Zoran Zaric · Jan 11, 2009 · Viewed 10.6k times · Source

I'm thinking about a good workflow for php/mysql web-development.

Anybody got some tips?

Answer

dragonmantank picture dragonmantank · Jan 11, 2009

Here is what we do:

  1. Everyone works on their projects in their branch (code, tests, etc)
  2. When everything looks good, it is merged into Trunk
  3. phpUnderControl rebuilds Trunk, runs all of our phpUnit tests, builds documentation, updated db, etc
  4. If all that passes, we merge into Stable
  5. Stable gets fully rebuilt like Trunk
  6. Stable is manually promoted to our Production server

We have a few custom scripts that take care of our database upgrades and our push to Production. For our database we keep all the deltas in a single folder and the script checks the current DB level against the available deltas and, if needed, applies them.

For promotion to Production we have another script that pulls down all the production data and then runs rsync to push up changes.

You don't mention what level of control you have over the servers, but the overall process would be the same for general development.