Stage From Prod DB
The current deployed stage database can be refreshed from prod with:
task db:update-stage
task db:update-stage -- --apply
The command uses the remote roots from lib/remote.sh:
- prod:
/var/www/prod - stage:
/var/www/stage
In effect, it:
- Exports the current stage DB to
~/backups/piratenbande/wordpress/for the SSH user. - Imports prod into stage.
- Rewrites
piratenbande.de,www.piratenbande.de,hosen-flicken.de, andwww.hosen-flicken.de - Sets
home,siteurl, andblog_publicfor stage. - Disables common WooCommerce gateways on a best-effort basis.
- Flushes the WordPress cache.
from both http and https to https://stage.piratenbande.de.
Afterwards, run:
task health:stage
Known caveat: stage uploads may be mounted from prod as read-only. Disable or reconfigure plugins on stage if they expect to write generated files under wp-content/uploads.
The stage safety mu-plugin also suppresses outbound mail and emits noindex headers when requests come through stage.piratenbande.de. Keep live payment/API credentials out of stage-specific config where possible; the DB sanitizer is only a safety net.