Skip to content
Back to the blog

How to migrate a website without losing files or email

A step-by-step guide to moving a website without losing anything: inventory, backups, testing the destination, DNS, email, redirects and post-move checks.

  • migrate website
  • website migration
  • DNS
  • SEO

Migrating a website means moving its files, data and configuration to another server or platform. Changing hosting and transferring the domain are different operations: you can change the server while keeping the domain registrar. A well-prepared migration reduces errors, but it does not guarantee there will be no interruptions.

1. Take an inventory before touching the site

Note the domain, the current provider, the public routes, the CMS or framework, versions, the database, forms, scheduled tasks, certificates and external services. Include email: identify where the accounts live and which MX, SPF, DKIM and DMARC records the domain uses. Changing only the website should not change those email records.

2. Save backups and confirm you can recover them

Export the files and the database separately, keep a copy outside the source server and check that the files can be opened. Note environment variables, versions and current DNS. Take a fresh backup just before the switch, when you can put the site in read-only mode or reduce writes.

3. Prepare and test the destination before changing DNS

Configure the application, import the data and check the site using a temporary URL or a provider preview. Review login, forms, images, links, test payments, scheduled tasks and error pages. Also check that the TLS certificate is ready for the domain.

If URLs change, build a map from old path to new and set up permanent one-to-one redirects where an equivalent page exists. Avoid sending every old page to the home page: keep the closest destination or return a proper 404/410 if the content is removed.

4. Change DNS with a window and a way back

Confirm the exact IP or target with the new provider. If you are going to lower the TTL, do so far enough in advance for resolvers to pick up the previous value. Change only the records needed for the website; keep the email and validation records. During propagation some visitors may reach the old origin and others the new one, so avoid losing data changes in that window.

Keep the previous hosting active until you have verified the new site from different networks. If a critical check fails, restore the previous record and analyse the problem before repeating the cutover.

5. Review crawling, traffic and email after the move

Test the important URLs, the redirects, HTTPS and sending email. Update the sitemap and the corresponding Search Console property if the domain changed; monitor 404 errors, indexing and traffic over the following weeks. Google notes that migrations can cause temporary fluctuations while it recrawls and reprocesses the URLs.

At Hostbrid, the WordPress migration guide helps you review the database, media and links. Before choosing a destination, compare Sites with a VPS: a VPS gives more control, and also requires you to administer its system and services.

Related reading: Automatic backups: what they cover and how to restore a site.

Manage your sites, servers and email.

Forgot your password?

Free, and it takes a minute.

At least 8 characters. Not all digits, not a common one.

We'll email you to confirm the account.