We use deployer.org. It's a bit like capistrano/capifony but written in PHP so the deployment configs/recipes are also written in PHP.
Your source is deployed to a new release directory and only once all tasks are successfully completed is the symlink to the "current" switched to the new folder. Release history is retained so rolling back is a single command.
I gave a short talk about it to the Thailand PHP User Group a few months back. Recently version 3.x was released which sees a number of improvements
The problem I see with stuff like this:
http://deployer.org/recipes/rsync
Is that you're effectively creating a new interface for the rsync command line tool. You're still stuck learning how rsync works, except you have an additional layer to deal with, while missing out on things like standard unix pipes.
If that's 'configuration' then so is writing a Makefile. And Make has the additional benefit that it doesn't require someone to create recipes for standard executables. It already works without it.
This is indeed the way to go, many deploy tools handle it this way.
It's worth it checking out these deploy tools:
For personal projects, I've used http://deployer.org/. It's actually pretty neat and ties very well with PHP environments, since it is itself written in PHP.
Here's an example of my deployment configuration/code.
it basically ssh's into your server, creates a new directory, pulls from your repo, runs all your dependency managers, run your db migrations (well, it will soon), switches symlinks to point to new code, restarts nginx, and then removes old directories while keeping a few recent releases around in case you need to revert quickly. That's not much code in that file I pointed to for the amount of things I listed above. And I'm just using the vanilla deploy config. There's ones for symfony and laravel, etc.
We use:
For us, the price is more than justified. Currently, we have like 30 active servers and managing them with Forge is really easy and convenient. I'm also currently activating Let's Encrypt Certificates on all sites and it's just SOOO easy with Forge ;)
I personally would recommend using git and optionally a deployment script to push changes without needing ftp. Then once you push a change you could either do a git pull
on the server or use your deployment script which does all that for you. If you're working with legacy code on a huge code base then use ssh w/ something like WinSCP.
Fair enough, but just wanted to mention that, if PHP is your most comfortable programming environment, you can script things in php.
Just create a file:
touch myscript
Give it executable perms:
chmod a+x ./myscript
Add this to the top of your php file:
#!/usr/bin/env php <?php
And then now you have a command line script that is written in PHP.
(hope this doesn't come across patronizing)
Other than that, I highly recommend: http://deployer.org/
seems like after further research, a possible way is to
also ran across a cool tool at
there's not a recipe for magento2 yet, so I will see if I can come up with one. If anyone else has one, that would be helpful.
If you are on a shoestring budget, you could no the following:
The current "standard" is to set up a folder where version 1 of your code is deployed (deploy/1), then make your configured www dir a link to 1. When you have a new version, extract it to deploy/2, run any jobs that you need to run, then change the symlink to point to 2. The link change is technically not atomic but happens so fast that it's a negligible issue.
Check out deployer: http://deployer.org it can manage the whole process for you and also takes care of managing links to folders that are shared between deployments (like user uploads)
Current work environment:
Pretty happy with it apart from Project/Task Management. Slowly moving towards a scrum approach but it's taking a long time.
Also not looking forward to having to move to Jenkins if PHPCI development is truly dead (any other self hosted recommendations welcomed).