Gem Version


It is advised to use bundler.

  1. Add the following to your projects Gemfile gem "capistrano-sozo_magento2", "~> 1.9"
  2. Install bundle install


Update the gem to the latest version with bundle update capistrano-sozo_magento2 --conservative


Make sure the following lines are added to your project's Capfile:

# Load SOZO Magento tasks
require 'capistrano/sozo_magento2'

We recommend putting them in the following location:

# Load DSL and set up stages
require 'capistrano/setup'

# Include default deployment tasks
require 'capistrano/deploy'

# Load SOZO Magento tasks
require 'capistrano/sozo_magento2'

require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git

Built Ins

We have the following built ins setup for default projects.

set :linked_files, []

set :linked_dirs, [

If you would like to customize the linked files or directories for your project, you can copy either one or both of the above arrays into the deployment/deploy.rb or deployment/deploy/*.rb files and tweak them to fit your project's needs. Alternatively, you can add a single linked dir (or file) using append like this:

append :linked_dirs, 'path/to/link'

Command Mapping

The module assumes the following bin files are in the following locations:

  1. php in your path accessible from the command line as php
  2. composer in /usr/local/bin/composer
  3. n98-magerun in /usr/local/bin/n98-magerun

Composer and n98-magerun command are both prefixed with the PHP path (for multi-php support), if you are overwriting these commands via the command map you will need to include the php bin in your stage.rb file similar to the following.

SSHKit.config.command_map[:php] = '/usr/bin/env php74 -dmemory_limit=-1'
SSHKit.config.command_map[:composer] = SSHKit.config.command_map[:php], '-f /usr/local/bin/composer'
SSHKit.config.command_map[:n98magerun] = SSHKit.config.command_map[:php], '-f /usr/local/bin/n98-magerun'
SSHKit.config.command_map[:wp] = SSHKit.config.command_map[:php], '-f /usr/local/bin/wp'
SSHKit.config.command_map[:magento] = SSHKit.config.command_map[:php], '-f bin/magento --'
SSHKit.config.command_map[:app_controller] = 'sudo /usr/bin/systemctl'


We use SemVer for versioning. For the versions available, see the tags on this repository or


See also the list of contributors who participated in this project.


This project is licensed under the Proprietary License - see the LICENSE file for details