Setting Up Automatic Backups
Backups are your safety net. If an update, hack, or hosting issue breaks your site, you can restore it within minutes. Set up an automated schedule that stores copies off-site and test restores regularly.
1) What to Back Up
- Database (posts, pages, settings, users, WooCommerce orders).
- Files:
wp-content(themes, plugins, uploads),wp-config.php, and custom code.
- Files:
- Exclude bulky temp folders: cache directories, backup archives,
node_modules,.git.
- Exclude bulky temp folders: cache directories, backup archives,
3–2–1 Rule: Keep 3 copies of your site on 2 different storage types with at least 1 copy off-site.
2) Choose Your Backup Solution
Host-Level Backups
- Most managed hosts provide daily snapshots + one-click restore.
- Great as a first layer, but still add an off-site plugin backup you control.
Plugin Backups
- UpdraftPlus (free/pro): schedules + off-site storage.
- WPVivid (free/pro): backups + staging + migration.
- BlogVault / Jetpack Backup / Duplicator Pro: reliable, incremental options.
Use both: host snapshots for fast rollbacks + plugin backups to external storage for portability.
3) Quick-Start (UpdraftPlus Example)
- Install & activate UpdraftPlus → Settings > UpdraftPlus Backups.
- Set schedule: Files = weekly, Database = daily (adjust for activity level).
- Choose remote storage: Google Drive, Dropbox, S3/Wasabi, OneDrive, or SFTP.
- Set retention (e.g., keep 10 backups) and exclude caches/backup folders.
- Click Save Changes and run your first Backup Now.
- Test a restore on staging or a local copy to confirm integrity.
Alternative (WPVivid)
- Install WPVivid → Settings: enable schedule, select remote storage, set retention and exclusions.
- Use Auto-Migration or Staging features to safely test restores.
4) Scheduling & Retention
| Site Type | Files | Database | Retention |
|---|---|---|---|
| Brochure / Low change | Weekly | Daily | 8–12 copies |
| Blog / Moderate | 2–3× per week | Daily | 15–20 copies |
| WooCommerce / High change | Daily (incremental if possible) | Hourly–6h | 30–60 copies |
Tip: Incremental backups copy only what changed—faster and less resource intensive.
5) Storage Destinations
- Cloud: Amazon S3 / Wasabi, Google Drive, Dropbox, OneDrive, Backblaze B2.
- Server: SFTP/SSH to another server (not the same host).
- Versioning & lifecycle: enable object lock/versioning and set auto-expiry to control costs.
Never store backups only on the same server as your website. A server failure or hack can remove both the site and its backups.
6) Security & Best Practices
- Encrypt database dumps and archives when supported; protect storage credentials.
- Lock down the
/wp-content/backup directory; deny web access or move it outside web root.
- Lock down the
- Automate pre-update backups before WordPress, theme, or plugin updates.
- Name conventions: include site, env, and date (e.g.,
brand-prod-YYYYMMDD-HHMM.zip).
- Name conventions: include site, env, and date (e.g.,
- Monitor failures: enable email/slack alerts for backup success/fail events.
7) Restore Workflow (Practice This!)
- Create a staging site or local environment.
- Import backup (plugin restore or manual: upload files + import SQL).
- Verify pages, forms, logins, WooCommerce orders, and permalinks.
- Plan downtime for live restores; put the site in maintenance mode if needed.
Quarterly drill: Perform a full restore test and document the steps so anyone on the team can execute them.
8) WooCommerce / Dynamic Sites
- Use incremental or real-time database backups to protect orders and customer data.
- Exclude Cart/Checkout from caching; coordinate maintenance windows to avoid order loss during restores.
- Consider transactional exports (orders/customers) as an extra safety layer.
9) Final Backup Checklist
- Automated schedules for files & database are enabled.
- Backups stored off-site with retention & lifecycle policies.
- Exclusions set for cache/temp/backup folders.
- Pre-update backups turned on; alerts configured.
- Encryption or access controls in place for archives.
- Successful test restore documented (staging/local).