How to Configure PHP Deployer in TYPO3?

Category : General , By : Sanjay Chauhan

Do you want to use most popular PHP Deployer in TYPO3 project? Follow these guide to Install Deployer, Configure Hosts, TYPO3 PHP Deployer code.

Step 1. Install PHP Deployer

// Download latest PHP Deployer
curl -LO

// Switch to root user + Move to bin to access "dep" command
sudo -s
mv deployer.phar /usr/local/bin/dep
chmod +x /usr/local/bin/dep

// Verify the installation
dep --version

Step 2. Configure PHP Deployer Hosts.yml

# Create .hosts.yaml at root of your project

# Configure Staging Server
  host: DOMAIN/IP
  user: username
  stage: staging
  branch: staging
  identity_file: ~
  deploy_path: /var/www/your/path/

# Configure Production Server
  host: DOMAIN/IP
  user: username
  stage: production
  branch: master
  identity_file: ~
  deploy_path: /var/www/your/path/

Step 3. Prepare TYPO3 Deploy.php


// Create deploy.php at root of your project

namespace Deployer;
require 'recipe/common.php';

# Project name
set('application', 'project');

# Define Git-Repository
set('repository', '');

# [Optional] Allocate tty for git clone. Default value is false.
set('git_tty', true);

# Set maxium releases backup
set('keep_releases', 5);

# Set Server

# DocumentRoot / WebRoot for the TYPO3 installation
set('typo3_webroot', 'public');

# Main TYPO3 task
task('deploy', [
])->desc('Deploy your project');
after('deploy', 'success');

# Shared directories
set('shared_dirs', [

# Shared files
set('shared_files', [

# Writeable directories
set('writable_dirs', [

# [Optional] if deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');

Step 4. Done! Go ahead to deploy.


dep deploy

To keep improving, Do you have feedback and suggestions? Or, Are you facing any issues to implement above TYPO3 tutorial? Feel free to write your comment at below comment box; I'll happy to help you :)

Post Comment

Your email address will not be published. Required fields are marked *


Name is required!

Enter valid name

Valid email is required!

Enter valid email address

Comment is required!

Google Captcha Is Required!

Be the First to Comment

Stay up to date with our recent TYPO3 Blogs, news, & updates