Moving a website to a new host does not have to mean downtime or lost data. This runbook gives you a repeatable migration process: compare the old and new environments, create verified backups, copy files and databases, lower DNS TTL, test the destination, complete a controlled cutover, and keep a rollback path until the new host is proven stable.
Overview
A successful website migration is a controlled change, not simply a file upload. The destination server must support the application’s runtime, database, web server behavior, scheduled jobs, mail requirements, and security configuration. DNS then has to direct visitors to the new environment at the right time.
The safest approach is to separate the work into four phases:
- Preflight: document the current site, confirm requirements, and prepare backups.
- Replication: copy files, databases, uploads, configuration, and scheduled tasks to the new host.
- Validation: test the site on the new server without changing public DNS.
- Cutover: freeze or synchronize changes, update DNS, verify services, and retain the old host for rollback.
This process applies to common WordPress, PHP, Node.js, static, and database-backed sites. Control-panel migration tools can reduce manual work, but you should still validate the result yourself. A provider’s one-click migration feature may not include every item, such as external DNS records, cron jobs, email accounts, firewall rules, or third-party integrations.
For a shorter operational checklist, see the Website Migration Hosting Checklist. If you are selecting infrastructure for a new application rather than moving an existing one, compare the requirements in the Open-Source App Hosting Guide or the SaaS MVP hosting guide.
What to track
1. Build a pre-migration inventory
Record the current environment before making changes. The inventory becomes both a migration checklist and a rollback reference.
- All domains, subdomains, aliases, redirects, and canonical hostnames.
- DNS records, nameservers, A and AAAA records, CNAMEs, MX records, TXT records, and verification records.
- Operating system, control panel, web server, PHP or Node.js version, extensions, and application framework.
- Database engine and version, database names, users, character sets, and approximate database size.
- Website files, media directories, private storage, environment files, and application-generated data.
- Cron jobs, queue workers, system services, webhooks, API integrations, and deployment scripts.
- TLS certificates, redirect rules, cache settings, firewall rules, and access restrictions.
- Email accounts, forwarding addresses, SMTP settings, and any mailboxes hosted on the same server.
Do not assume that the web root contains everything the site needs. A CMS may store uploads outside the document root, while a framework may depend on environment variables or a separate storage volume.
2. Compare the source and destination
Before copying data, confirm that the new host can run the application. The following comparison table is a useful minimum. Exact requirements vary by software version, plugins, and traffic pattern, so check the application’s own documentation where available.
| Area | Source to record | Destination to confirm |
|---|---|---|
| Runtime | PHP, Node.js, Python, or other version | Compatible runtime and required extensions |
| Database | Engine, version, size, and credentials | Compatible engine, storage, users, and import limits |
| Web server | Apache, Nginx, LiteSpeed, or platform routing | Document root, rewrites, headers, and proxy rules |
| Storage | Files, uploads, logs, and free space | Capacity, permissions, backups, and expansion options |
| Operations | Cron, workers, queues, and deployment method | Equivalent schedules, services, and monitoring |
| Network | DNS, mail, external APIs, and allowlists | New IP addresses, firewall rules, and provider limits |
A managed WordPress host, shared account, VPS, and container platform expose different controls. A VPS gives you more responsibility for patching, backups, and server configuration; a managed platform may simplify those tasks but restrict low-level changes. Use the managed WordPress hosting comparison when the site depends on WordPress-specific staging, backup, or support workflows.
3. Create and test backups
Take at least one full backup before migration and keep a copy outside the source server. Include the database, site files, uploads, configuration, and any required certificates or deployment secrets. Preserve the original backup until the migration is complete and the rollback window has ended.
A backup is not verified merely because a job reported success. Restore it to a temporary environment, inspect the database, open representative pages, and confirm that uploaded files are present. The backup and restore strategy provides a broader framework for testing recovery.
4. Prepare DNS, SSL, and email
Identify who controls the authoritative DNS zone. If DNS is managed by a separate provider, the hosting migration may require only record changes; if nameservers are moving too, plan that as a separate change. Lower the relevant DNS record TTL before cutover, subject to the provider’s controls. A lower TTL can make planned changes easier to revise, but it does not guarantee that every resolver will refresh immediately.
Plan TLS separately from DNS. The new host needs a certificate for every required hostname, including the www version and relevant subdomains. Some certificate systems require the hostname to resolve before issuance, while others support DNS-based validation. Confirm the method before cutover.
Mail deserves special caution. Preserve MX, SPF, DKIM, and DMARC records unless you are intentionally changing email providers. If mailboxes are hosted on the old server, determine whether they need to be migrated independently. A website move can appear successful while silently disrupting inbound or outbound email.
Cadence and checkpoints
Use a written timeline rather than making changes in an improvised order. The following schedule works for many small and medium sites; extend the testing period for high-volume or stateful applications.
Several days before cutover
- Record DNS, application, database, email, and server settings.
- Confirm the destination’s runtime, database, storage, and network requirements.
- Create and test a restorable backup.
- Lower DNS TTL for records that will change.
- Provision the destination and restrict administrative access.
- Copy an initial version of files and database content.
One day before cutover
- Install the application and import the database.
- Set environment variables, permissions, rewrite rules, cron jobs, and workers.
- Issue or install TLS certificates on the destination.
- Test the site through a temporary hostname, hosts-file override, staging URL, or provider preview feature.
- Check login, forms, search, uploads, payments, webhooks, API calls, redirects, and admin functions.
At cutover
- Announce a maintenance window if the application accepts orders, comments, uploads, or other changing data.
- Enable maintenance mode or temporarily stop writes where practical.
- Take a final database backup and perform a final file synchronization.
- Import the final database changes and confirm timestamps or row counts where useful.
- Update the relevant A, AAAA, or CNAME record, not unrelated DNS records.
- Confirm the new server receives requests and serves the correct certificate.
- Re-enable writes, then monitor logs, application errors, uptime, forms, and transactions.
Keep the old environment online and unchanged during the observation period. Do not immediately cancel the old account or overwrite its data. The length of this period depends on traffic, DNS behavior, application complexity, and your tolerance for risk.
Transfer methods
For small sites, a control-panel migration tool or archive upload may be adequate. For larger sites, use a resumable transfer such as rsync or the provider’s supported migration utility. Export databases in a format compatible with the destination and account for import size limits, character encoding, and serialized application data. After transfer, compare file counts, directory sizes, database tables, and a sample of recent uploads.
For frequently changing sites, an initial copy followed by a final incremental synchronization reduces the time spent in maintenance mode. It does not remove the need for a final consistency check: database writes and uploaded files must be synchronized together so the application does not reference data that was not copied.
How to interpret changes
DNS propagation is not a single global event. Different resolvers, networks, devices, and cached applications may continue using the previous answer for different periods. Check the authoritative record and query from more than one independent DNS resolver. A DNS propagation check can show where results differ, but it cannot prove that every visitor has switched.
During the first hours after cutover, distinguish DNS-related behavior from application errors. If some requests reach the old server and others reach the new one, compare logs on both systems. If all requests reach the new server but pages fail, investigate runtime versions, database credentials, permissions, rewrite rules, missing extensions, environment variables, or external service allowlists.
Monitor more than the homepage. Check:
- HTTP status codes, redirect chains, and canonical URLs.
- TLS validity and mixed-content warnings.
- Login, checkout, contact forms, search, uploads, and transactional workflows.
- Database errors, PHP or application exceptions, queue failures, and cron execution.
- Inbound email, outbound mail, SPF/DKIM alignment, and mailbox access if mail moved.
- Resource usage, response time, disk space, and backup job results.
Define rollback criteria before the change. Examples include persistent application errors, missing user data, failed transactions, broken email, or a destination capacity problem that cannot be corrected within the maintenance window. If the issue is limited to one feature, fix forward only when the cause is understood and the rollback risk is higher.
Rollback template
Keep this decision record with the migration ticket:
- Trigger: What failure requires reversal?
- Owner: Who can approve and perform the DNS change?
- Previous records: What were the old A, AAAA, CNAME, MX, and related values?
- Data state: Which writes occurred after cutover, and how will they be preserved?
- Action: Restore the previous DNS records, re-enable the old application, and verify the old environment.
- Validation: Confirm representative pages, logins, forms, transactions, and email.
- Follow-up: Document the cause, retain evidence, and schedule a corrected migration.
Rollback is not a substitute for backups. If users can create or change data after cutover, reversing DNS may split data between environments. For stateful applications, pause writes or create a documented reconciliation plan before switching back.
When to revisit
Review this runbook before every migration and update your local version at least quarterly. Hosting control panels, provider migration tools, supported PHP and database versions, certificate workflows, DNS interfaces, and backup defaults can change. The exact screens and menu names are less important than preserving the underlying checks.
Revisit the inventory after major application updates, a provider change, a domain or email change, a move to containers, or the addition of a new external integration. Re-test restoration monthly or quarterly according to the site’s risk, and perform a full migration rehearsal before a high-stakes launch or infrastructure redesign.
For a practical next step, copy the preflight list into your project tracker, assign an owner to each item, record the original DNS values, and schedule a short post-cutover review. Keep the old host until logs, backups, email, and application workflows have remained healthy for the agreed observation period. This turns “how do I move a website to a new host?” into a repeatable change process with evidence, checkpoints, and a credible path back.
For DNS-specific planning, consult the Cloudflare DNS setup guide. If the migration is part of a larger cost or architecture review, use the cloud hosting cost audit checklist after the new environment has stabilized.