Jetzt neu und frisch, besser vom Niederrhein. 
KLXM Studio – Home
Get in touch

Agencies & network · Advanced · 0:40 min

Staging & deploy

What the interface shows – and the commands for releases, rollback and content.

No sound, with subtitles German and English subtitles – switch them on and off with “CC” in the player. The video is hosted on this server and only loads when you press play. The steps below are the full text of the video.

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.

  1. Staging is a separate installation with a copy of the live content. The network shows what is not live.
  2. Before interventions: “Wartung ▾” – backup now, maintenance mode, clear page cache.
  3. Health check for deploys: /health answers without secrets (ok, version, environment).
  4. 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.