Deployer is an open-source deployment tool for PHP projects — specifically designed to automate, standardize, and securely deploy applications like Laravel, Symfony, Magento, WordPress, or any custom PHP apps.
It’s a CLI tool, written in PHP.
You define your deployment process in a deploy.php
configuration file with clearly defined tasks.
It supports zero-downtime deployment using symbolic links (symlinks).
It supports multi-environment deployments (e.g., staging, production).
Install Deployer via Composer:
composer require deployer/deployer --dev
Generate a config template:
vendor/bin/dep init
Configure deploy.php
, e.g., for Laravel:
host('my-server.com')
->set('deploy_path', '/var/www/myproject')
->set('branch', 'main');
task('deploy', [
'deploy:prepare',
'deploy:vendors',
'artisan:migrate',
'deploy:publish',
]);
Deploy your app:
vendor/bin/dep deploy production
Deployer:
Connects to the server via SSH
Clones your Git repo into a new release directory
Installs Composer dependencies
Runs custom tasks (e.g., php artisan migrate
)
Updates the symlink to point to the new release (current
)
Removes old releases if configured