Skip to content

Migration

Fresh

How to migrate your MainWP Dashboard or child sites to a new server.

Migrating the Dashboard

Step-by-Step

  1. 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/
  2. Transfer backup to new server

  3. Restore on new server

    bash
    # Database
    wp db import dashboard-backup.sql
    
    # Files
    tar -xzf dashboard-files.tar.gz -C /var/www/new-dashboard/
  4. Update URLs if domain changed

    bash
    wp search-replace 'old-dashboard.com' 'new-dashboard.com' --all-tables
  5. Reconnect 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"
  6. 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)

  1. Backup child site (files + database)
  2. Restore on new server
  3. Point DNS to new server
  4. Sync from Dashboard — should reconnect automatically

Different Domain

  1. Backup and restore child site on new server
  2. Update URLs in database:
    bash
    wp search-replace 'old-child.com' 'new-child.com' --all-tables
  3. In MainWP Dashboard → Sites → Edit Site → Update URL
  4. Reconnect the site

Bulk Migration

For migrating many child sites simultaneously:

  1. Document all current site URLs and server IPs
  2. Backup all sites (use MainWP's backup extension)
  3. Restore on new servers
  4. Update DNS records
  5. Bulk reconnect from Dashboard:
    • Dashboard → Sites → Select All → Reconnect

Troubleshooting Migration

IssueFix
Sites show "Disconnected"Reconnect from Dashboard
"Invalid request" errorsDNS hasn't propagated — wait or flush DNS
SSL errors after migrationInstall new SSL certificate on new server
Extension data missingRe-import extension settings
Cron not runningReconfigure system cron on new server
Different PHP versionMatch 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