To migrate your website to a new hosting provider, you need to back up all your files and database, upload them to the new server, and update your DNS records before cancelling the old account. Done in the right order, the whole process takes 1–4 hours with no noticeable downtime for your visitors.
Whether you're switching for better pricing, faster servers, or improved support, this step-by-step guide walks you through everything — from the initial backup to the moment your domain points to the new host without anyone noticing the switch.
Before You Start: What You Need Ready
A smooth migration starts with preparation. Before touching any files, make sure you have:
- Access to your current hosting control panel (cPanel, Plesk, etc.) and FTP or file manager.
- Access to your new hosting account — plan purchased and active.
- Access to your domain registrar so you can edit DNS records when the time comes.
- An FTP client such as FileZilla (free) installed on your computer.
- At least 2–3 hours of uninterrupted time for your first migration.
Do not cancel your old hosting until you have confirmed everything works on the new one. Keep both accounts active in parallel for at least 48 hours after you change the DNS.
Step 1: Create a Full Backup of Your Site
Your backup is the safety net. If anything goes wrong, you return to this point with zero data loss.
Backing up your files
- Open the file manager in your current cPanel, or connect via FTP.
- Navigate to
public_html(or the root folder where your site lives). - Select all files, compress them into a ZIP archive.
- Download the ZIP to your computer.
Backing up your database
- In cPanel, open phpMyAdmin.
- Select your database in the left panel.
- Click Export, choose SQL format, and download the
.sqlfile.
If your current host offers a Full Backup option in cPanel's Backup Wizard, use it — it bundles files, databases, email accounts, and settings into a single archive.
Step 2: Upload Files to the New Hosting Account
With your backup in hand, load everything onto the new server.
Uploading files via FTP or file manager
- Connect to the new hosting account with FileZilla using the FTP credentials from your welcome email.
- Navigate to
public_htmlon the new server (right panel in FileZilla). - Drag your backed-up files from your computer (left panel) to the server.
- Wait for the transfer to complete — this can take several minutes for larger sites.
Importing the database
- In the new cPanel, create a MySQL database under MySQL Databases.
- Create a MySQL user and assign it to the new database with full privileges.
- Open phpMyAdmin, select the new database, click Import, and upload your
.sqlfile.
After importing, update your site's configuration file (e.g., wp-config.php for WordPress) with the new database name, username, and password.
Step 3: Test the Site Before Changing DNS
This step is critical — and often skipped. You want to verify everything works on the new server before pointing your domain there.
Edit the hosts file on your computer to temporarily map your domain to the new server's IP address:
192.0.2.10 yourdomain.com www.yourdomain.com
Replace 192.0.2.10 with your new host's IP (found in your welcome email or the cPanel account information section). Save the file, then open your site in a browser — you'll see the new server even though public DNS still points to the old one.
Check that:
- The homepage loads correctly.
- Images, menus, and navigation work.
- You can log into the admin panel.
- Contact forms and shopping cart (if applicable) work end-to-end.
When everything checks out, remove the hosts file entry.
Step 4: Update the Domain's DNS Records
Once the new server is confirmed working, redirect public traffic to it.
- Log in to your domain registrar (GoDaddy, Namecheap, or wherever you registered the domain).
- Find the Nameservers or DNS section.
- Replace the current nameservers with the ones provided by your new host (e.g.,
ns1.newhost.comandns2.newhost.com). - Save the changes.
DNS propagation takes 2–48 hours. During that window, some visitors may hit the old server and some the new one — but since both have identical content, there is no risk of data inconsistency.
To speed up propagation, lower your DNS records' TTL to 300 seconds (5 minutes) at least one hour before changing the nameservers. The shorter TTL means caches expire faster.
Need a hosting team that handles all of this for you? Check out elenlace.com's managed hosting plans, which include assisted migration at no extra charge.
Step 5: Verify and Close the Old Account
Wait 48–72 hours after changing DNS, then:
- Visit your site from different devices and networks to confirm all traffic hits the new server.
- Test email accounts configured on the new host.
- Confirm the SSL certificate is active (most hosts install Let's Encrypt automatically).
- Only after this verification should you cancel or let the old hosting account expire.
If you're on WordPress, run the Better Search Replace plugin to update any hardcoded old URLs remaining in the database — especially important if your old host's IP appeared in any stored links.
Key Takeaways
- Always back up both your files and your database before starting a migration.
- Test the new server using the
hostsfile trick before changing public DNS. - Lower your DNS TTL to 5 minutes in advance to speed up propagation.
- Keep the old hosting account active for at least 48–72 hours after the DNS switch.
- Verify SSL, email, and forms before cancelling the old account.
Ready to switch hosts without the stress? Contact the team at elenlace.com and we'll migrate your site quickly and safely.
FAQ
How long does a hosting migration take?
The technical steps — backup, upload, database import — take 1–4 hours depending on site size. After that, allow 2–48 hours for DNS propagation to complete worldwide.
Will my site go down during the migration?
Not if you follow this order. While DNS propagates, the old server stays live. Visitors hit one server or the other, but both have the same content. That's why you must not delete anything from the old host until the new one is fully verified.
Do I need coding skills to migrate my website?
Not really. With cPanel access, phpMyAdmin, and an FTP client, most site owners can follow these steps without writing a single line of code. WordPress users can lean on migration plugins to automate large parts of the process. For complex sites or e-commerce stores, professional assisted migration is the safest bet.
What happens to my email accounts during the migration?
Email accounts need to be recreated on the new host. If you have important messages you want to keep, export them through a desktop client like Thunderbird before switching DNS. Many hosting providers include email migration in their onboarding process or offer it for a small additional fee.
Browse more guides in our hosting glossary to master every concept you need for managing your web presence.
Useful resources
Other providers and guides worth comparing: