Migration
FreshHow to migrate your MainWP Dashboard or child sites to a new server.
Migrating the Dashboard
Step-by-Step
Full Backup of the Dashboard site (files + database)
bash# Database wp db export dashboard-backup.sql # Files tar -czf dashboard-files.tar.gz /var/www/dashboard/Transfer backup to new server
Restore on new server
bash# Database wp db import dashboard-backup.sql # Files tar -xzf dashboard-files.tar.gz -C /var/www/new-dashboard/Update URLs if domain changed
bashwp search-replace 'old-dashboard.com' 'new-dashboard.com' --all-tablesReconnect all sites — required because encryption keys are tied to the Dashboard
bash# Via WP-CLI wp mainwp sites sync --all # Or via Abilities API curl -X POST -u "admin:xxxx" \ -H "Content-Type: application/json" \ -d '{"input":{"site_ids":"all"}}' \ "https://new-dashboard.com/wp-json/wp-abilities/v1/abilities/mainwp/reconnect-sites-v1/run"Verify all sites show "Connected" status
Important Notes
- SSL certificates must be valid on the new server
- DNS must point to the new server before reconnecting
- Extensions need re-authentication if API keys are domain-locked
- Cron jobs must be reconfigured on the new server
Migrating Child Sites
Child site migration is simpler — the Dashboard doesn't need changes unless the child site URL changes.
Same Domain (Server Change Only)
- Backup child site (files + database)
- Restore on new server
- Point DNS to new server
- Sync from Dashboard — should reconnect automatically
Different Domain
- Backup and restore child site on new server
- Update URLs in database:bash
wp search-replace 'old-child.com' 'new-child.com' --all-tables - In MainWP Dashboard → Sites → Edit Site → Update URL
- Reconnect the site
Bulk Migration
For migrating many child sites simultaneously:
- Document all current site URLs and server IPs
- Backup all sites (use MainWP's backup extension)
- Restore on new servers
- Update DNS records
- Bulk reconnect from Dashboard:
- Dashboard → Sites → Select All → Reconnect
Troubleshooting Migration
| Issue | Fix |
|---|---|
| Sites show "Disconnected" | Reconnect from Dashboard |
| "Invalid request" errors | DNS hasn't propagated — wait or flush DNS |
| SSL errors after migration | Install new SSL certificate on new server |
| Extension data missing | Re-import extension settings |
| Cron not running | Reconfigure system cron on new server |
| Different PHP version | Match PHP version or test compatibility |
Pre-Migration Checklist
- [ ] Full backup of Dashboard (files + database)
- [ ] Full backup of all child sites
- [ ] Document current server configurations
- [ ] Document extension API keys
- [ ] Verify new server meets system requirements
- [ ] Plan DNS TTL reduction (lower TTL before migration)
- [ ] Schedule maintenance window
- [ ] Test restore process on staging first