Blue-Green Updates for WordPress on a Single Lightsail Instance

Even small WordPress sites can deploy with near-zero interruption by preparing a green copy and switching traffic intentionally.

Step 1: Mirror app files into versioned release folders

/opt/bitnami/releases/2026-03-11-01/
/opt/bitnami/releases/2026-03-11-02/
ln -sfn /opt/bitnami/releases/2026-03-11-02 /opt/bitnami/current

Step 2: Run health checks before cutover

curl -f http://127.0.0.1/wp-login.php
curl -f http://127.0.0.1/category/16/

Step 3: Keep rollback pointer for instant recovery

ln -sfn /opt/bitnami/releases/2026-03-11-01 /opt/bitnami/current
sudo /opt/bitnami/ctlscript.sh restart apache

Pitfall

Deploying directly in-place with no reversible release pointer.

Verification

  • Health checks pass on new release before traffic switch.
  • Rollback takes under one minute.
  • Release directories are immutable after activation.

Get New Tutorials by Email

No spam. Just clear, practical breakdowns you can apply right away.

Enjoy this tutorial?

Get new practical tech tutorials in your inbox.