How to Migrate a Website to a New Host Safely. This guide focuses on practical planning, common pitfalls and steps you can validate on your own setup.
Before you move: inventory the whole site
A hosting migration is more than copying a public_html directory. List every domain and subdomain, application runtime, database, scheduled task, email mailbox, SSL certificate and external integration. Note the current DNS records and their time-to-live (TTL) values. Identify where DNS is actually managed: this may be the registrar, a CDN or a separate DNS provider. A change at the hosting provider does not necessarily update the authoritative DNS zone.
Create a verified backup and a rollback plan
Export both the site’s files and its database, and save copies outside the old host. For WordPress, include wp-content, wp-config.php and a complete database export. Also record server-side configuration, redirects and any application secrets. Verify the archive can be opened and that a test restore succeeds. Keep the old hosting account active until the migration has been validated; this provides a rollback path if something fails.
Prepare the destination before changing DNS
Provision the new host with compatible PHP, database and web-server versions. Import the files and database, update credentials and permissions, and configure HTTPS. If the destination has a temporary hostname, use it for initial checks; for production-like testing, a local hosts-file override is often more reliable than editing public DNS prematurely. Avoid mixing live and test environments in the same database.
Test functionality, performance and SEO
Test login, forms, search, checkout if applicable, scheduled jobs and media uploads. Confirm that internal URLs, canonical tags, robots.txt, sitemaps and HTTP redirects behave as expected. Check that emails are sent and received if mail hosting is also moving. Compare response codes and page performance on representative URLs, not just the homepage. Record errors before the cutover so you can distinguish existing defects from migration issues.
Cut over DNS with minimal disruption
Lower relevant DNS TTL values ahead of the migration where practical. Immediately before the switch, synchronize the latest content and database changes; a write freeze may be needed for dynamic sites. Change only the appropriate A, AAAA or CNAME records and verify the result using multiple resolvers. Existing cached records may remain effective until their previous TTL expires. Avoid claiming a guaranteed zero-downtime migration when write synchronization and DNS caches are outside your full control.
Watch the site after launch
Monitor uptime, server logs, form submissions, email, crawl errors and key landing pages for several days. Keep the previous host available until you are confident all traffic has moved. Confirm backups are running on the new platform and then retire the old service in a controlled way.
Related reading
If the new server runs Linux, review our Ubuntu Server security checklist. For remote administration, see our network scanning reference before exposing services to the internet.
Final checklist
Document the changes you make, test them on your own setup and keep a safe rollback path. Prefer official product documentation when specific interfaces or commands change.
Topic reference: original source. This guide is independently written and does not reproduce its instructions.





