Migrating a Website to a New Host Without Downtime
Practical guide to moving a website to a new host safely: backups, DNS TTL, files, database, testing, SSL, email records, final switch and post-migration checks.
Introduction
Moving a website to a new host does not have to mean visible downtime. A good migration is prepared before DNS is changed. The website files and database should be copied to the new host, tested privately, secured with SSL, and only then switched live.
Most migration problems happen when DNS is changed too early, the database is not synced correctly, email DNS records are lost, SSL is not ready, or the old hosting is deleted before the new site is fully verified.
Quick answer
To migrate a website without downtime, back up the old site, lower DNS TTL before migration, copy files and database to the new host, test the site on the new server, prepare SSL, keep email DNS records unchanged, update DNS only when ready, monitor the site after launch and keep the old host online until traffic fully moves.
Website migration
Website migration means moving a website from one hosting environment to another. This can be a move from shared hosting to VPS, VPS to another VPS, one cPanel account to another, one data center to another, or one provider to another.
A no-downtime migration means users should continue seeing a working website during the move. In practice, the goal is to prepare the new hosting first, test it carefully, then make the DNS switch only after the new site is ready.
Some DNS propagation delay is normal. The safest approach is to keep both old and new hosting online during the transition.
Before migration
Before moving anything, collect all required access and configuration.
You need:
- old hosting access
- new hosting access
- domain/DNS access
- database access
- FTP/SFTP/SSH access
- control panel access if available
- SSL certificate method
- email hosting details
- current DNS zone export
- website files backup
- database backup
- list of cron jobs
- list of redirects
- list of subdomains
- PHP/runtime version
- application configuration files
Do not start the migration if you do not have DNS access. Without DNS control, you cannot safely switch traffic to the new host.
Lower DNS TTL
TTL controls how long DNS resolvers may cache a record. Lowering TTL before migration helps DNS changes spread faster when you switch to the new host.
Recommended approach:
- lower TTL 24–48 hours before migration when possible
- use a temporary TTL such as 300 seconds
- lower A, AAAA and CNAME records related to the website
- avoid changing MX records unless email is also moving
- restore normal TTL after migration is stable
Lowering TTL after the DNS change is less useful. It should be done before the final switch.
Backups
Create a complete backup before changing the live site.
Back up:
- website files
- database
- uploads/media
- configuration files
- .htaccess or Nginx rules
- cron jobs
- redirects
- SSL notes
- DNS zone
- email DNS records
- application environment files
A backup should be downloadable and restorable. Do not rely only on a backup stored inside the same hosting account.
Copy files and database
After backup, copy the website to the new hosting environment.
For file-based websites:
- copy files to the correct web root
- preserve folder structure
- check file ownership
- check file permissions
- copy hidden files such as .htaccess
For database websites:
- export database from old host
- create database on new host
- import database to new host
- update database credentials in config
- check character set and collation
- test database connection
For WordPress, the most important items are files, wp-content, database, wp-config.php, uploads, plugins, themes and permalink rules.
Test before DNS switch
The new site should be tested before public DNS points to it.
Testing methods:
- temporary URL from hosting provider
- staging subdomain
- hosts file preview
- server IP preview if supported
- control panel preview
- local DNS override
Check:
- homepage loads
- important pages load
- admin login works
- forms work
- database connection works
- images load
- CSS/JS loads
- internal links work
- redirects work
- no PHP errors
- no mixed content
- correct PHP version
- correct file permissions
Do not rely only on the homepage. Test important pages, forms, checkout, login, search and dynamic pages.
SSL preparation
SSL should be ready as soon as traffic reaches the new host.
Options:
- Let’s Encrypt after DNS points
- DNS validation certificate before switch
- temporary certificate if supported
- CDN-managed certificate
- hosting panel AutoSSL
Check:
- certificate covers root domain
- certificate covers www if used
- HTTPS works after switch
- HTTP redirects to HTTPS
- no mixed content
- certificate renews automatically
If SSL cannot be issued before DNS changes, plan the switch during a low-traffic window and issue SSL immediately after DNS points to the new host.
Protect email
Website hosting and email hosting may be separate. A website migration should not break email.
Before changing DNS, copy:
- MX records
- SPF record
- DKIM records
- DMARC record
- autodiscover records
- mail subdomain records
- verification TXT records
If only the website is moving, usually change A/AAAA/CNAME records for the website only. Do not change MX records unless email is also being migrated.
Why this matters
Migration planning matters because downtime is often caused by avoidable mistakes: DNS changed too early, SSL not ready, database not imported, wrong PHP version, missing files, broken permissions, lost MX records or old hosting cancelled too soon.
A careful migration keeps both old and new environments available until the new host is verified and traffic has moved.
How to check readiness
Use Domain Health Checker, DNS Lookup, Website Status Checker and SSL Checker before and after switching.
- DNS records — Confirm A, AAAA and CNAME records are ready.
- Email records — Confirm MX, SPF, DKIM and DMARC are preserved.
- New host preview — Test the website before public DNS switch.
- SSL — Confirm certificate can be issued or is already ready.
- Website status — Check homepage and important URLs.
- Redirects — Check HTTP to HTTPS and www/non-www behavior.
- Database — Confirm dynamic content works.
- Forms and login — Test contact forms, admin login, checkout or customer areas.
Check migration readiness
Use Domain Health Checker to review DNS, SSL, website status, email records and related configuration before and after switching hosts.
Common problems
DNS changed before new site was ready
HighVisitors are sent to an incomplete or broken new host.
Next step: Test the new host first and prepare rollback DNS if needed.
TTL not lowered before migration
MediumSome users may continue reaching the old host for longer.
Next step: Lower TTL before future migrations and keep both hosts online during propagation.
Database not synced
HighThe new site has old or missing dynamic content.
Next step: Re-export/import database or pause writes during final sync.
Email records lost during nameserver change
HighMX, SPF, DKIM or DMARC records were not copied to the new DNS zone.
Next step: Restore email DNS records immediately.
SSL not ready on new host
HighUsers may see certificate warnings after the switch.
Next step: Issue SSL, check hostname coverage and enable HTTPS redirects.
Wrong PHP version or missing extensions
MediumThe application works on old host but fails on new host.
Next step: Match PHP version and install required extensions.
File permissions broken
MediumUploads, cache, admin actions or page loads may fail.
Next step: Fix ownership and permissions for web root and writable directories.
Redirects missing
MediumOld URLs, HTTP/HTTPS or www/non-www behavior changes unexpectedly.
Next step: Copy .htaccess/Nginx rules and test redirect paths.
Cache shows old content
LowBrowser, plugin, CDN or server cache still serves previous content.
Next step: Clear cache after migration and retest.
Old host cancelled too soon
HighSome users or DNS resolvers may still reach the old server.
Next step: Keep old hosting active until traffic and DNS are stable.
Migration steps
-
Step 1: Audit current hosting
List files, database, DNS records, email records, PHP version, cron jobs and redirects.
-
Step 2: Lower website DNS TTL
Reduce TTL before the migration window.
-
Step 3: Back up everything
Download files, database and DNS zone backups.
-
Step 4: Prepare new host
Create web root, database, PHP version, SSL plan and required services.
-
Step 5: Copy files and database
Move website data and update configuration.
-
Step 6: Test privately
Use temporary URL, staging subdomain or hosts file preview.
-
Step 7: Final database sync
For dynamic sites, pause writes or sync recent changes before cutover.
-
Step 8: Switch DNS
Update A/AAAA/CNAME records to the new host.
-
Step 9: Verify live site
Check status, SSL, forms, redirects, login, media and important pages.
-
Step 10: Keep old host temporarily
Do not cancel old hosting until DNS and traffic are stable.
WordPress migration notes
WordPress migrations need extra attention because content is split between files and database.
Check:
- wp-content folder
- uploads
- plugins
- themes
- wp-config.php
- database credentials
- serialized data if replacing URLs
- permalink settings
- .htaccess rules
- PHP version
- memory limit
- cache plugin
- security plugin
- SMTP plugin
- cron jobs
- WooCommerce orders if applicable
For WooCommerce or membership sites, plan a maintenance window or final database sync to avoid losing new orders, registrations or form submissions.
Hosts file preview
A hosts file preview lets you test the new server while the public domain still points to the old host.
New server IP:
192.0.2.10
Local hosts entry:
192.0.2.10 example.com
192.0.2.10 www.example.com
Hosts file changes affect only your local computer. Remove the entries after testing so your computer uses public DNS again.
Rollback plan
A rollback plan helps you recover if the migration fails.
Before switching DNS, prepare:
- old host remains online
- old DNS values saved
- database backup available
- new host changes documented
- low TTL active
- access to DNS panel confirmed
- support contacts ready
- testing checklist ready
If the new host fails, you can temporarily point DNS back to the old server while fixing issues.
Post-migration checklist
Post-migration checklist
Use this checklist after the DNS switch.
Homepage returns 200
Confirm the homepage loads successfully.
Important pages return 200
Test key pages, not only the homepage.
SSL certificate is valid
Check certificate coverage and expiry.
HTTP redirects to HTTPS
Confirm secure redirects work.
www/non-www canonical works
Verify preferred hostname behavior.
Forms send correctly
Test contact forms and submissions.
Admin login works
Confirm CMS or app admin access.
Images/CSS/JS load
Check media and asset delivery.
Database content is current
Verify dynamic content after final sync.
Sitemap loads
Confirm sitemap URL is reachable.
robots.txt loads
Check crawler rules are present.
Contact forms deliver email
Test form email delivery after migration.
MX/SPF/DKIM/DMARC still correct
Confirm email DNS records were preserved.
Analytics still tracking
Verify tracking scripts or tags still work.
Error logs checked
Review server and application logs.
Old host kept online
Keep old hosting until traffic is stable.
Backups confirmed on new host
Set and verify backups on the new server.
Useful migration checks
Check DNS:
dig example.com A
dig www.example.com CNAME
dig example.com MX
Check website status:
curl -I https://example.com
Follow redirects:
curl -IL http://example.com
Preview new host with curl:
curl -I --resolve example.com:443:192.0.2.10 https://example.com
Check SSL:
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -subject -issuer -dates
Check old HTTP:
curl -IL http://example.com
Commands are illustrative. Replace example.com and IP addresses with your real values. Use provider tools if SSH or command-line access is not available.
Frequently asked questions
Can I migrate a website with zero downtime?
You can usually minimize visible downtime, but DNS propagation and dynamic content changes must be planned carefully.
Should I lower TTL before migration?
Yes. Lower TTL before the DNS switch so changes can propagate faster.
Will moving website hosting affect email?
Not if email DNS records are preserved. Email can break if MX, SPF, DKIM or DMARC records are removed.
Should I cancel the old hosting immediately?
No. Keep the old host online until DNS and traffic are stable.
How do I test the new host before DNS change?
Use a temporary URL, staging subdomain, hosts file preview or local DNS override.
What about WooCommerce or membership sites?
Plan a maintenance window or final database sync so new orders, users or submissions are not lost.
What should I check after migration?
Check website status, SSL, redirects, forms, login, database content, email records, logs and backups.
Related tools
Use these free tools to verify your configuration after applying changes.
Related guides
Browse all Hosting & VPS guides →Need help applying this fix?
Send us your domain, report link or issue details. CheckDomainHealth will review the request and route it to the right technical team if hands-on support is needed.
Was this guide helpful?
Your feedback helps us improve our guides for everyone.
Thanks for your feedback!