Backups should be automated and tested. Use them before migrations or major changes.
DB backup
wp db export backup.sql
Restore
wp db import backup.sql
⚠️ Test restores periodically in staging.
Related
- Full WordPress site migration (files + DB + config) on Ubuntu — when you’re moving the whole site