Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Just another Wordpress Deployment with Capistrano
branch: master

Merge pull request #6 from drumba/master

remove trailing slash from default theme directory
latest commit 5d5df39b06
Kristof Dreier authored

Wordpress Capistrano (3) Deploy

Easy deployment for Wordpress sites including your database.


  1. Your production and staging servers have to be accessible via ssh
  2. Git has to be installed in every environment
  3. The same applies to wp-cli (


For the capistrano deployment to run properly you have make some preparations to your local environment:

  1. Get the latest wordpress version with git submodule init and git submodule update
  2. capistrano must be installed: bundler install
  3. Rename local-config.SAMPLE.php to local-config.php and replace the placeholders with your database credentials
  4. Rename config.SAMPLE.rb to config.rb (located in the config directory). For every stage you have to edit your database credentials. Pay attention to the :local_url variable!
  5. Rename the files in config/deploy accordingly and edit the variables so they match the environment
  6. Activate the WP Migrate DB and WP Migrate DB CLI plugin


bundle exec cap staging deploy

Deploy your current code base to the staging server

bundle exec cap staging wordpress:db:pull

Copy the staging database to your local database.

bundle exec cap staging wordpress:db:push

Copy the local database to the staging server

The tasks wordpress:db:pull and wordpress:db:push will find the remote url and replaces it with your local url. So keeping your database in sync is a no brainer.


  • Wordpress Multisite Deployment
  • Keeping upload folders in sync
  • Wordpress as a submodule it's ugly, but it gets the job done ...
Something went wrong with that request. Please try again.