You've paid for the new server, the old one is still taking visitors, and you'd rather nobody noticed the switch. Knowing how to move a website to another server comes down to order: the old copy stays live until the new one has proven itself.
Quick Answer: Lower your DNS TTL to 300 seconds at least 24 hours ahead. Copy your website files and database to the new server, then test it privately through your hosts file. Freeze content changes, run a final sync, and point the A record at the new IP. Keep the old server running for 72 hours before you cancel it. As of September 2026, the same sequence works for WordPress, Laravel, static HTML and any PHP app.
Last verified: September 2026, against PHP's official supported-versions list (8.2 to 8.5, with 8.5 the current stable branch) and Ubuntu Server 26.04 LTS and 24.04 LTS.
Our team resolves 20 to 30 client issues every day, and a steady share of them begin with a move that went wrong at the DNS step. This guide follows the order we actually use, written so you can run it yourself. Running WordPress? How to Move WordPress to a New Host: Complete 12-Step Guide adds the plugin and search-replace details. This page covers any site, from a folder of HTML to a custom PHP app.
What Moving a Site to a New Server Actually Involves
Every migration moves three things: the files (code, uploads, config), the database if the site has one, and the DNS records that tell browsers which IP address to visit.
As of 2026, a zero-downtime website migration rests on one rule: both servers must serve a working copy of the site for the entire DNS propagation window. That window runs from about 5 minutes with a 300-second TTL to roughly 48 hours for a nameserver change. Downtime happens when the new server isn't ready yet, or the old one is switched off too early. Moving a whole VPS with several sites, databases and mailboxes is a bigger job. Here's what a full server migration service covers.
Effort depends on the site type:
| Site type | What you copy | Write freeze needed at cutover? |
|---|---|---|
| Static HTML/CSS/JS | Files only | No |
| WordPress, Joomla, Drupal blog | Files + MySQL/MariaDB database | Short, if comments or forms are active |
| WooCommerce or other online store | Files + database + mail settings | Yes, 10-20 minutes |
| Laravel or custom PHP app | Files, database, .env, cron jobs, queue workers | Yes |
Do I actually need to take my site offline to move it?
No. A static site needs no pause at all. A site that accepts writes (orders, comments, form entries, sign-ups) needs a short content freeze during the final sync, usually 10 to 20 minutes, and visitors can still read every page while it runs.
How to Move a Website to Another Server: The Freeze-and-Flip Method
Copy everything, prove it works privately, freeze writes, flip DNS, then hold the old server. Our team calls this sequence Freeze-and-Flip.
Across the 4,000+ site migrations Hostaccent has handled, the step people most often get wrong is sequence. They point DNS at the new IP first and copy files second, which guarantees an outage for as long as the upload takes.
1. Lower your DNS TTL 24 to 48 hours ahead
Set the TTL on your A, AAAA and www records to 300 seconds. The old value (often 14,400 or 86,400 seconds) has to expire from resolver caches before the new one counts, which is why this happens a day early. Your DNS host's documentation, such as Cloudflare's DNS documentation, shows where the TTL field lives.
2. Match the new server's environment
Check the PHP version, PHP extensions, database engine and web server before you copy anything. Pick a branch still on PHP's official supported-versions list, ideally 8.4 or 8.5, since 8.2 loses security fixes on 31 December 2026. If your site relies on .htaccess rules, the new server needs Apache or LiteSpeed, because Nginx alone ignores that file. Leave disk and inode headroom too, since a full account triggers errors like 508 Resource Limit Is Reached: Causes & Fixes (2026). Leaving shared hosting for your own box? The Migrate Shared Hosting to Linux VPS: Practical Checklist covers stack setup in detail.
3. Copy website files and database
Whether you transfer a website to a new server with rsync or a panel backup, the job is the same: files plus a consistent database snapshot. With SSH on both ends:
bashrsync -avz -e ssh user@OLD_IP:/home/user/public_html/ /home/user/public_html/ mysqldump --single-transaction --quick --routines old_db > site.sql mysql -u new_user -p new_db < site.sql
If both servers run cPanel, a full account backup or WHM's Transfer Tool moves files, databases and mailboxes in one pass (see the cPanel documentation). Afterwards, update database credentials in your config file (wp-config.php, .env or similar).
4. Test privately through your hosts file
Add one line to your computer's hosts file (/etc/hosts on macOS and Linux, C:\Windows\System32\drivers\etc\hosts on Windows):
bash203.0.113.10 example.com www.example.com
Your browser now loads the new server while everyone else still sees the old one. Click through logins, forms, search and checkout. Then delete the line.
Pro Tip: Skip the hosts file for a quick check with
curl -I --resolve example.com:443:203.0.113.10 https://example.com. It forces that one request to the new IP and tests the SSL certificate at the same time.
5. Freeze writes and run a final sync
Put the old site in maintenance mode or pause checkout, then run the same rsync again (it only sends changed files, so it takes seconds) and take a fresh database dump. Import it on the new server.
6. Flip the A record
Change the A record (and AAAA, if you use IPv6) to the new IP. With a 300-second TTL, most visitors arrive at the new server within 5 to 10 minutes.
7. Hold the old server for 72 hours
Keep the old server running for at least 72 hours after the DNS change. Some ISP and corporate resolvers ignore low TTLs and cache records far longer than they should, and anyone they send to the old IP still needs a working site. Cancel only when the old access log shows no real visitor traffic for a full day.
Prefer a specialist-managed migration?
Eligible moves into Hostaccent hosting are included at no separate migration charge. Independent migrations between other providers are scoped and quoted before work begins.
Should You Change the A Record or the Nameservers?
Change the A record whenever you can. It's the only switch your TTL work actually speeds up.
Lowering your TTL has no effect on a nameserver change, because nameserver delegation is cached from the domain registry itself. For a .com domain, that delegation carries a 172,800-second TTL, which is 2 days, no matter what you set in your own zone. If you want to move a site without downtime, DNS is the part worth rehearsing, and switching nameservers also means recreating every MX, SPF and DKIM record or email breaks.
Insider Insight: If the new host requires its own nameservers, split the job in two. First recreate your whole DNS zone at the new provider with the A record still pointing at the OLD server, then switch nameservers and wait 48 hours. Nothing changes for visitors. After that, flip the A record with a 300-second TTL at a time of your choosing.
SSL, Email and Database Writes: What Breaks After Cutover
Three things fail quietly after a move: the certificate, the mailboxes and data written during propagation. Plan for each before you flip.
The SSL certificate gap
A Let's Encrypt certificate issued through the HTTP-01 challenge cannot be created for a domain until that domain resolves to the new server. A site moved without a certificate already in place can therefore show browser warnings for its first 5 to 30 minutes after the DNS flip. The DNS-01 method avoids that gap because it validates through a TXT record instead.
Both methods are explained in Let's Encrypt's challenge types guide. Simpler still: copy the existing certificate and key across, since they stay valid until expiry. According to Hostaccent's monthly support-queue data, SSL problems make up about 20% of all tickets, and a freshly moved site serving the wrong certificate is a pattern we see in that queue.
Email that silently stops
If your mailboxes live on the old host, moving the website doesn't move them. Either create the mailboxes on the new server and copy mail over IMAP before changing MX records, or leave email where it is and change only the A record. Our step-by-step guide to migrating email to a new host covers the IMAP copy and the MX switch.
Orders and comments stranded on the old database
During propagation, some visitors still reach the old server. Anything they write there (an order, a comment, a contact-form entry) never reaches the new database.
Pro Tip: Before you cancel the old host, compare the newest order or comment ID on both databases. If the old one is higher, export those rows and add them to the new server by hand.
Server Migration Checklist: Verify Before You Cancel the Old Host
Verify from outside your own network, not just your browser. A server migration checklist should confirm DNS, HTTPS, permissions and URLs in under 15 minutes, using tools that ignore your local cache. Running the same checks again 24 hours later catches resolvers that were still holding the old record.
- DNS:
dig +short example.com A @1.1.1.1and@8.8.8.8both return the new IP. - HTTPS:
curl -I https://example.comreturns a 200 status and a certificate with current dates. - Permissions: files at 644 and folders at 755, owned by the account user. A sudden 403 Forbidden Error: How to Fix It (Step-by-Step 2026) after a move is almost always ownership.
- PHP errors: a blank page or 500 Internal Server Error WordPress: Fix It Fast (2026) usually means a missing PHP extension or wrong database credentials.
- URLs: if any paths changed during the move, map them with 301 Redirect htaccess Setup: Copy-Paste Examples 2026 so rankings follow.
Your Next Step: A Move You Don't Have to Run Alone
Now you know how to move a website to another server without losing an order: copy, prove, freeze, flip, then hold the old box for 72 hours. You can run that sequence yourself this weekend, or hand it to engineers who do it every day. Hostaccent's free migration puts the copying and testing in the hands of our own 24/7 support engineers, and the Economy plan at $1.99/mo renews at $1.99/mo, with NVMe storage, free SSL, a 99.99% uptime guarantee and a 30-day money-back guarantee from a UK-registered host. One honest caveat: Economy is sized for a single site, so if you're moving several, Standard at $4.58/mo fits better. When you're ready, start on the Economy plan.
Frequently Asked Questions
How long does it take to move a website to another server?
The copy itself usually takes 10 minutes to a couple of hours, depending on how many gigabytes of files and database you have. The part that needs calendar time is DNS: lower the TTL a day before, then allow up to 72 hours of overlap after the switch. Plan for about 3 to 4 days from start to cancelling the old host, with only a few minutes of hands-on cutover work.
Will moving my website to a new server hurt SEO?
Not if the URLs, content and HTTPS stay the same. Search engines care about the pages they crawl, not the IP address behind them, so a clean move is invisible to rankings. Problems come from side effects: broken URLs, a missing certificate, or a slower server. Keep your permalink structure identical, add 301 redirects for anything that changed, and check Google Search Console for crawl errors in the first week.
How to move a website to another server with only FTP access?
Download every file over FTP or SFTP, then export the database through phpMyAdmin if the old host offers it. Upload the files to the new server, create an empty database, import the export and update the credentials in your config file. Static sites only need the files. If you have no database access at all, ask the old host for a full account backup before you cancel; most provide one on request.
Should I cancel my old hosting right after the DNS change?
No. Keep the old account active for at least 72 hours after you change DNS, and longer if you switched nameservers. Some resolvers hold old records beyond their TTL, so a few visitors keep landing on the old server for a while. Before cancelling, check that its access log has gone quiet and copy across any orders or comments written there during the overlap. Cancelling too early is one of the most common causes of avoidable downtime we see.
What should I do if the site breaks after the move?
Point the A record back at the old server's IP. Because you kept it running and set a 300-second TTL, most visitors return to the working copy within 5 to 10 minutes. Then fix the problem on the new server at your own pace, test it again through your hosts file, and repeat the final sync before you flip. A rollback plan is the reason the old server stays live.












Discussion
Have a question or tip about this topic? Share it below — your comment will appear after review.