Agencies & network · Advanced · 0:40 min
Staging & deploy
What the interface shows – and the commands for releases, rollback and content.
Goal
Code reaches the server tested and with a backup; staging gets a copy of the live content when needed.
Prerequisites
- SSH access or CI (GitHub Actions) and target files
deploy/targets/{target}.env.
Step by step
Transcript: every step matches one subtitle in the video.
- Staging is a separate installation with a copy of the live content. The network shows what is not live.
- Before interventions: “Wartung ▾” – backup now, maintenance mode, clear page cache.
- Health check for deploys: /health answers without secrets (ok, version, environment).
- Deploy on the command line: deploy/deploy.sh staging or production – with backup, migrate, health and rollback.
Commands & configuration
deploy/deploy.sh staging # bauen, hochladen, migrieren, prüfen, umschalten
deploy/deploy.sh production # zusätzlich vorher Sicherung
deploy/deploy.sh production --rollback # vorheriges Release aktivieren
deploy/sync-content.sh default # Datenbank + Medien einer Website: Live → Staging
php bin/console health --all
php bin/console site:backup --all
Tips & pitfalls
Tip
Staging ('environment' => 'staging') keeps search engines out, shows a notice bar and redirects emails.
Watch out
Schema changes run against the live database before switching – they must be additive.