Config lives in /Users/david/Sites/daw/wp-cli.yml (@production alias). Set the
real SSH user@host:/path there first; needs WP-CLI on the remote + SSH key.
# 1. Back up local first
wp db export _claude/scratch/local-backup-$(date +%F).sql # run from theme dir
# 2. Stream prod DB straight into local (no intermediate file)
wp @production db export - | wp db import -
# 3. Rewrite URLs (and fix serialized data safely)
wp search-replace 'https://davidawindham.com' 'https://daw.ovid' --skip-columns=guid
# 4. Flush caches (WP Super Cache is active)
wp cache flush
--skip-columns=guid — never rewrite GUIDs; they're permanent identifiers.wp_options autoload / transients can bloat the dump — consider
wp transient delete --all on local after import.wp-content/uploads) are a separate sync (rsync), not part of the DB.