I've been using Bedrock (https://roots.io/bedrock/) for a while to deploy WordPress websites, but have encountered some issues when deploying to a Siteground.com shared server.

The issue is with composer. I can run composer globaly with no problem, but when I run it using Capistrano, it executes the command, but nothing actually happens.

If I run Capistrano on debug mode, the composer command returns a weird message. Something like this: Content Type: Text/HTML []?

It must be really simple to fix, but I'm a bit lost. Any ideas?

  • Did you ever get Bedrock Capistrano working on Siteground? – christian Apr 14 '16 at 2:24
  • Solution: I added the following line to my deploy.rb script: SSHKit.config.command_map[:composer] = "/usr/local/php56/bin/php-cli ~/composer.phar". It specifies what php-cli to use and where composer.phar is located. Hope it helps other people too. – Felipe Rinaldi Apr 15 '16 at 2:13

The solution was pretty simple, actually. I just needed to specify the path of the php-cli that I wanted to use and where the composer.phar file was located. So I added the following to my depoly.rb script for Capistrano:

SSHKit.config.command_map[:composer] = "/usr/local/php56/bin/php-cli ~/composer.phar"

You can try to use something like Codeship instead.

Unfortunately I didn't try it with Bedrock, but with Sage based themes it's working pretty well.

And the bonus here is that you can have up to 5 private projects for free, + make some automated tests.

Please let me know what is your exact workflow for deploying with Siteground? It can be quite interesting to know, how you did this on shared hosting.


This is an usual part of my capistrano setups.

composer.phar is renamed/moved to just $HOME/bin/composer

Then make sure it's executable

$ chmod +x $HOME/bin/composer

You can override session vars easily easily using capistrano's :default_env variable.

set :default_env, { path: '$HOME/bin:/usr/local/php56/bin:$PATH' }

execute :composer should be using php56 and just working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.