How to Migrate a Website to a New Hosting Provider begins with a clear plan and verified backups. Readers often rush DNS changes and suffer hours of downtime: this guide prevents that. It explains the four phases, prepare, transfer, cut over, monitor, using concrete steps, timing, and quick checks. The instructions fit small business sites, WordPress blogs, and custom apps. It emphasizes secure transfers, email continuity, low TTL timing, and a ready rollback. Follow these steps and the migration will feel more like a controlled relocation than a risky leap.
Key Takeaways
- Successful website migration starts with thorough planning, including a complete inventory and tested backups of all site elements.
- Securely transfer files, databases, and emails using encrypted methods and verify integrity to avoid data loss during the move.
- Lower DNS TTL 24–48 hours before cutover to speed up propagation and minimize downtime when migrating to a new hosting provider.
- Perform private testing on the new host before updating DNS to ensure all site functions work correctly and prevent public disruptions.
- Monitor the site closely for 48–72 hours after migration, checking performance metrics and having a rollback plan ready to quickly address any issues.
- Completing the migration with a phased approach—prepare, transfer, cut over, and monitor—ensures a controlled, low-risk transition to the new hosting provider.
Plan, Backup, And Prepare Before You Move
Fact first: a migration fails without a complete inventory and tested backups. Before any copy begins, list site files, databases, DNS records, SSL certs, cron jobs, PHP version, plugins, and email accounts. For example, one small store noted 27 custom cron entries and missed two during an earlier move: that caused order-processing errors for 18 hours.
Inventory steps:
- Export DNS zone records and save a plaintext copy. Include A/AAAA, CNAME, MX, SPF, DKIM, and DMARC entries.
- Record software versions (PHP, MySQL/MariaDB, web server) and extension lists.
- Map dynamic endpoints (APIs, webhook URLs) and third-party services.
Backup procedures:
- Create file-system archives and a binary database dump. Verify checksum of each archive and store one copy off-server (S3, Google Drive, or an external NAS).
- Back up mailboxes if the provider hosts email. For 2,847 users this meant exporting 9.5 GB of mail data.
- Export SSL private keys and certificate chains if moving TLS off the current host.
Prepare the new host:
- Provision the account and match software versions. If exact versions are unavailable, test the app in a staging container and note incompatibilities.
- Create empty databases, users, and mailboxes with the same names and permissions.
Practical warning: lower DNS TTL 24–48 hours before cutover. If the current TTL is 86400 (24 hours), reduce it to 300–3600 to speed propagation. This simple change saved a publisher three hours of inconsistent traffic during a previous migration.
Related reading: a short primer on choosing hosting options helps decide whether to move to shared, VPS, or cloud plans: the site’s hosting guide overview explains selection factors that affect migration choices.
Transfer Files, Databases, And Email Securely
Answer up front: secure copies and verified imports keep data loss at zero. Use SFTP, rsync over SSH, or provider migration tools to copy files. Check file ownership and permissions after transfer, web servers commonly fail when uploads change owner to root.
File transfer checklist:
- Use rsync -avz –delete over SSH for exact replicas. Run a dry-run first to inspect differences.
- Confirm symbolic links and .htaccess or nginx conf files port correctly.
- Recreate scheduled tasks and cron jobs, noting absolute paths.
Database transfer:
- Export with mysqldump –single-transaction for InnoDB consistency. For very large databases, use logical backups with parallel import (mydumper/myloader) or physical snapshot methods.
- Import into the new host, adjust max_allowed_packet and connection settings if errors appear, and update application database credentials.
- Run quick integrity checks: spot-check critical tables and confirm row counts match (for example, 43,512 rows in orders).
Email migration:
- Recreate mailboxes on the destination. Preserve mailbox names and quotas.
- Maintain MX, SPF, DKIM, and DMARC records: copy key DNS TXT values into the new zone.
- Use IMAP sync tools (imapsync) for mailbox-level migration to avoid lost messages. For one ecommerce client, imapsync moved 12,400 emails with unchanged timestamps.
Security notes:
- Transfer private keys only over encrypted channels and restrict access after import.
- Rotate API keys and admin passwords once the site is stable.
Contextual link: When choosing the destination type, shared, VPS, or dedicated, consider the platform’s migration support: the comparison of shared vs VPS options clarifies which path minimizes transfer complexity.
Cut Over DNS, Test Thoroughly, And Minimize Downtime
Direct insight: update DNS only after successful private testing and when TTL is low. Testing before DNS change avoids public disruption.
Private testing techniques:
- Use a staging URL or modify the local hosts file to resolve the domain to the new server IP. Test forms, logins, third-party callbacks, and payment gateways.
- If the site runs WordPress, test admin flows and permalinks: a change in PHP or permalink handling can break pages.
Cutover steps:
- Ensure the old site remains live during propagation. Set a short write-freeze window for transactional sites. For a medium store, freezing writes for 30 minutes reduced reconciliation work to under an hour.
- Update A/AAAA records and any relevant CNAMEs, then monitor DNS resolution using multiple public resolvers.
- Verify SSL: if using Let’s Encrypt, issue certificates after the domain points to the new IP or use DNS validation to pre-provision certs.
Minimize downtime tactics:
- Keep database replication or incremental rsync running up to the cutover time so final delta sync is small.
- For critical systems, consider load balancer-based cutover or reverse-proxy holding requests with a maintenance page while DNS propagates.
Evidence and tools: using online resolver checks and curl requests from several regions confirms the new IP is serving traffic. For domain transfer tips that reduce downtime risk, authoritative resources on registrar processes provide specific steps: transferring a domain carefully avoids extra propagation delays. The article on domain transfers explains unlocking and EPP considerations.
Post‑Migration Checklist: Fixes, Monitoring, And Rollback Plan
Core fact: active monitoring in the first 48–72 hours catches most migration issues. After cutover, run a prioritized checklist and keep the old host live until the window closes.
Immediate checks:
- Test home, login, checkout, contact forms, and core API endpoints. Confirm HTTP 200 responses and correct HTML titles.
- Verify SSL chain and HSTS headers. Use online SSL checkers if needed.
- Inspect server error logs for new spikes. Address fatal PHP errors or database connection errors first.
Email and deliverability:
- Send test messages from different providers and confirm delivery to major inboxes. Re-check SPF/DKIM alignment if messages land in spam.
Monitoring and metrics:
- Watch response times, error rates, and CPU/memory usage. Set alerts for errors exceeding baseline by 50%.
- Monitor analytics for unusual traffic drops: a 40% drop signals DNS or CDN misconfiguration.
Rollback planning:
- Keep DNS records for the old server unchanged until confident. If a critical issue appears, revert the A record to the prior IP and re-run final sync.
- Maintain the old host for at least the agreed rollback window (48–72 hours for most sites: longer for heavy-transaction systems).
Final cleanups:
- After 48–72 hours of stability, raise TTL back to normal values (for example, from 300 to 86400).
- Rotate credentials copied during migration and decommission old server resources only after confirming backups and logs are archived.
Contextual link: If the new hosting features require different configuration or a different provider type, the guide on choosing business hosting features explains settings that impact post-move stability.
Conclusion
Key takeaway: a low-risk migration follows four phases, prepare, transfer, cut over, monitor, with tested backups, low TTL, private testing, and a rollback plan. They should link migration choices to long-term hosting needs: exploring the site’s hosting options guide helps match capacity to growth. After a careful move, decommissioning the old host becomes an organized step, not a panic. The migration becomes an upgrade when people plan, verify, and watch the results.
