Simple capistrano deployment script for yii php application.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
config Modified script for yii config Nov 12, 2014
yii-config Initial scripts added Nov 12, 2014
LICENSE Initial commit Nov 11, 2014 Update Nov 12, 2014


Build automation for yii using Capistrano.

Simple build automation using Capistrano's deployment script for yii php based application.


A remote server automation and deployment tool written in Ruby.


• Deploy builds directly from git to your server.
• Define your own git branch to deploy, default is master.
• Parametrized for git username & password for security reasons.
• Ready for any enviroment i.e. Dev, Staging or Producation with their configuration.
• Migrate database changes by default.


To deploy use the following commands:
cap production deploy user=git-user-name:git-user-password
cap production deploy user=git-user-name:git-user-password branch=another-master


• Install ruby using RVM.
• Install capistrano gem using command "gem install capistrano".
• Clone this repo or download source.
• Modify your yii-capistrano/yii-config/main.php and yii-capistrano/yii-config/console.php files.
• Edit your app name in config/config.rb as ":application".
• Edit your git repository in config/config.rb file as ":repo_url".
• Edit directory where files should be deployed in config/config.rb as ":deploy_to".
• Edit your ssh username and server ip address in config/deploy/production.rb as ":app".
• Edit your ssh password in config/deploy/production.rb as ":ssh_options".
• Optionaly edit staging.rb if you have staging.

Configuration for Yii

Copy your yii app config file i.e. /protected/config/main.php and /protected/config/console.php to yii-capistrano/yii-config/ Next thing you can modify yii-capistrano/config/deploy.rb to fit your requirements. Similarly for yii-capistrano/config/deploy/production.rb and yii-capistrano/config/deploy/staging.rb

Have questions?

E-mail me to


Coming soon.

Developer Resources

Check out the URLs bellow to find out how its done:
yii 1.1

Kick Starter (for developers)

Just fork the repository, clone it or just download its source. Deploy it on any directory and run or modify it from there.

Interested in contributing?

You can modify script to meet your requirment, its simple just fork this repo from the link bellow:


Yiipistrano - build automation for yii using Capistrano - by Waqar Alamgir