Deploying PHP Applications?

So, a question for everyone out there – we’re looking to do a bit of an overhaul for our build and release system and I was wondering what kind of setups you all out there had for your releases?

I’ve seen all sorts of different things (including a version control->rsync to production push and a fully CruiseControled push for everything) but I wanted to hear back from you fellow PHPers out there as to the kind of stuff you’re using. We’re looking to try to keep it open sourceish stuff, so suggestions down that line would be best but we’re pretty open.

I don’t have much experience with a more formalized build process but we’re coming up against a need to separate out the responsibilities a bit more.

What do you use for your build (and deployment) process for your PHP applications and websites?

Category: Personal, PHP 14 comments »

14 Responses to “Deploying PHP Applications?”

  1. Brian

    I use Phing. It’s written in PHP and since I was already familiar with Java’s “ant” I was quite comfortable with it. I highly recommend it.

  2. James

    Bazaar, which does all our version control and can either checkout (watch the .bzr dir!) or export (optionally to an archive). Once an archive is complete you can build a deb or rpm for the app and install the app using the system package manager.

  3. saad

    I use rsync, actually symfony rsync command line, that lt you configure and update multiple environments (dev, staging, qa, live and whatever you call your environments). Works pretty well.
    The only problem we have is the synchronise the DB structure and configuration datas that are in the DB.

  4. Jeff

    open.controltier.com is what we run for all builds, PHP, Java, Perl. We even have started to use it to admin the servers with their latest CTL tool.

    Once you get it understood you can do a lot, we deploy apps across a couple hundred machines with some configs with automated rollback etc. and we have simple installs that just take care of two machines.

  5. Dave Marshall

    We currently use phing to pull the codebase from subversion, configure it and run database migrations. It keeps every release(including the migration scripts) and symlinks to the most up to date, allowing us to rollback if a release goes wrong.

    See this for a simple version of our migrations

    http://www.davedevelopment.co.uk/2008/04/14/how-to-simple-database-migrations-with-phing-and-dbdeploy/

  6. Eirik Hoem

    We use a few different apps (phpUndercontrol, Phing, rpm). I’ll try to sum up:

    phpUndercontrol (which is basically CruiseControl) for making sure that everything we put into SVN is proper. It generates docs, runs unit tests, syntax checks and sends us reports if anything fails.

    Then, when doing a release we have a neat script which controls the different Phing build files for various projects. IE: “./build appname release 1.2.1″ would invoke phing with the build file for appname. Phing checks out the code from the given release branch in SVN, then checks syntax, runs unit tests, compresses the code and generates a RPM file which is ready to deploy on our servers.

  7. gasper_k

    Phing with lots of custom tasks and Symfony sync on some projects.

  8. Peter Mescalchin

    Rsync deployments have been one of the best changes I have made to my release strategy over the last year when moving releases to live. It’s nice to know you have mirror versions of dev/production code bases without relying on pokey FTP upload sessions :)

    Also with the remote working distance between myself and the servers (1/2 way round the world) – dealing with inevitable latency whilst using an FTP client became a real pain to handle…

    Like @saad said, database deployments I still handle manually.

  9. Krasio

    I use Capistrano (both for symfony and Zend Framework projects) and it rocks.

  10. Marc Gear

    You should read the Pear Installer Manifesto by Greg Beaver – its an interesting look on code deployment using Pear.

    I currently use subversion to keep our systems up-to-date – with a set of control scripts to update machines.

  11. enygma

    wow! excellent – thanks for the great responses. I’ll have to go through these and see what sorts of things might fit our situation best…

  12. Falcão

    I use springloops.com – very cool, we can use capistrano too or webstrano.

  13. Demian Turner

    we use 2 shells scripts, one local that exports the repo at the relevant revision and cleans it up, one remote that receives the revision parameter and sets up the perms and symlinks on the server:

    http://trac.seagullproject.org/browser/branches/0.6-bugfix/etc/deploy_local.sh

    http://trac.seagullproject.org/browser/branches/0.6-bugfix/etc/deploy_remote.sh

  14. bob

    We are using Syncman – http://syncman.limb-project.com


Leave a Reply



Back to top