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
SSH (Secure Shell) is a network protocol that establishes an encrypted connection between two computers. It is mainly used for securely logging into remote systems (e.g., servers) and executing commands.
ssh username@server-ip
scp file.txt username@server-ip:/destination-folder/
ssh-copy-id username@server-ip
SSH is commonly used by developers and system administrators to manage servers or establish secure connections for other applications.