Backup & Rollback
Deploy Forge automatically backs up your theme before each deployment, allowing you to instantly restore previous versions if something goes wrong.
Automatic Backups
When Create backups is enabled (recommended), Deploy Forge:
- Creates a ZIP archive of your current theme directory
- Stores the backup linked to the deployment record
- Proceeds with deploying the new version
If the deployment fails partway through, you still have the backup to restore from.
Backup Storage
Backups are stored in your WordPress uploads directory:
wp-content/uploads/deploy-forge-backups/
├── backup-123-2024-01-15-143052.zip
├── backup-124-2024-01-16-091523.zip
└── backup-125-2024-01-17-162341.zip
Each backup filename includes:
- Deployment ID
- Date and time of backup
Backup Contents
Backups include your entire theme directory:
- All PHP files
- CSS and JavaScript files
- Images and assets
- Template files
- Everything in
wp-content/themes/your-theme/
Performing a Rollback
To restore a previous version of your theme:
- Go to Deploy Forge → History
- Find a successful deployment you want to restore
- Click the Rollback button
- Confirm the rollback
Deploy Forge will:
- Extract the backup ZIP
- Replace your current theme files
- Mark the original deployment as "Rolled Back"
The rollback completes in seconds.
Rollback Requirements
You can only rollback if:
- The deployment was successful (failed deployments have no deployed files to restore)
- A backup exists for that deployment
- The backup file hasn't been deleted
What Gets Restored
Rollback restores theme files only:
- All files from the backup are copied to your theme directory
- Database changes are NOT rolled back
- Plugin settings are NOT affected
- Media uploads are NOT affected
If your deployment included database migrations or option changes, those won't be reverted automatically.
Managing Backups
Disk Space
Backups can consume disk space over time. Monitor your usage:
- Each backup is roughly the size of your theme
- A 10MB theme with daily deployments = ~300MB/month of backups
Automatic Cleanup
Deploy Forge can automatically delete old backups. Configure retention in settings:
- Keep backups for X days
- Keep last X backups
- Delete backups when deployment is deleted
Manual Cleanup
You can safely delete old backup files via FTP/SFTP:
# Delete backups older than 30 days
find wp-content/uploads/deploy-forge-backups/ -name "*.zip" -mtime +30 -delete
Or delete specific backups through your hosting file manager.
Disabling Backups
If disk space is limited or you have other backup systems:
- Go to Deploy Forge → Settings
- Disable Create backups before deploying
- Save settings
Warning: Without backups, you cannot rollback deployments. Only disable if you have alternative recovery options.
Recovery Scenarios
"My site is broken after deployment"
- Go to Deploy Forge → History
- Click Rollback on the last working deployment
- Your site is restored in seconds
"I need to restore from 3 deployments ago"
- Go to Deploy Forge → History
- Find the specific deployment you want
- Click Rollback (works for any deployment with a backup)
"The backup file is missing"
If the backup ZIP was deleted:
- You cannot rollback that specific deployment
- Check if you have external backups (hosting provider, backup plugin)
- Deploy a known-good commit manually
"Rollback didn't fix the issue"
The problem might not be in theme files:
- Check for database changes that need reverting
- Check plugin settings or configurations
- Review the deployment logs for what changed
Best Practices
- Keep backups enabled - The disk space cost is worth the safety net
- Test rollbacks - Try a rollback on staging to understand the process
- Monitor disk space - Set up alerts if backup storage grows too large
- Have external backups - Deploy Forge backups complement, not replace, full site backups
- Document database changes - If deployments include migrations, document how to reverse them