Skip to content
developer

Deployment

EnvironmentURLBranchDeploys
Localhttp://ENV_NAME.testanymanual
Staginghttps://staging.ENV_NAME.comdevelopon push
Productionhttps://ENV_NAME.commainmanual trigger

Push to develop — GitHub Actions runs the deploy pipeline automatically:

  1. Composer install (no dev deps)
  2. JS/CSS build (npm run build)
  3. rsync to staging server over SSH
  4. wp cache flush on the server

Production deploys are manual to avoid accidents.

  1. Merge developmain via a PR
  2. Go to GitHub Actions → Deploy to productionRun workflow
  3. Confirm the deploy completed in the Actions log
  4. Spot-check the live site

Database changes are never automated. Before deploying any code that requires a schema change:

  1. Take a backup: wp db export --add-drop-table pre-deploy.sql
  2. Run the migration manually via WP-CLI or phpMyAdmin
  3. Then deploy the code
Terminal window
# Revert the last deploy (re-deploys previous release)
# SSH into the server
cd /var/www/ENV_NAME
git checkout <previous-commit>
composer install --no-dev
wp cache flush