How to move your website to a new host


If you run a website—whether it’s a small, personal site dedicated to a hobby or interest, or a larger site that you use to promote your work or sell a product—there may come a time when you want to move it. Your site may have outgrown your current hosting plan, you may be disappointed in the service or support of your hosting provider, or you may simply want to change because you’ve found a better price.

My website, Kirkville, recently started outgrowing its hosting plan. With traffic reaching around 250,000 page views a month, I hit the limit of what my provider could support with standard, shared hosting. All it would take was one article that got a lot of traction, and the site could be overloaded. In addition, my previous host had a server problem back in February, which kept my site offline for about 36 hours, and I was unhappy with their support. So, I decided it was time to move.

Two years ago, I moved from France to the United Kingdom. I had to find a new place to live, manage having my possessions moved, and deal with administrative stuff, like taxes and utilities. In some ways, moving a website is similar. There are many things you need to do—there’s much more involved than simply moving files—to make sure that everything goes smoothly.

The way you move your website will depend on how you manage three things: Your domain name, your email, and the site itself. Here’s how I moved my own website, and a couple of alternative setups you could try that are slightly different from mine.

Finding a new host

The first thing you need to do is find a new hosting company. Web hosts are as ubiquitous as hot dog carts in lower Manhattan, so it’s hard to choose. There are big companies, which show up in all the Google searches—you’ve certainly seen names like GoDaddy, Hostgator, and Dreamhost,. And there are dozens, hundreds, even thousands of smaller companies, which range from very cheap to fairly expensive. If you run a WordPress blog—as I do—you can also check out companies that offer more specialized WordPress hosting.

With web hosting, you often get what you pay for, but many more expensive hosts can have poor support.

The best place to start is by asking people you know for recommendations. You’ll get some negative comments about some companies, and positive ones about others. I opted for NameCheap, based on a friend’s recommendation. The company has a Business SSD plan, which is a step up from standard hosting, and is a bit faster.

new host

I went with NameCheap, but there are plenty of hosting providers and packages to choose from.

Depending on your website, you may hit limits that hosts apply. Some hosts will give you a maximum amount of storage—so if you run a photo or video website, be sure to pay attention to these limits, since you’ll likely need a lot of space. Others limit your bandwidth, or a monthly number of sessions. Others, including NameCheap, have resource usage limits. These are hard to calculate, but you’ll know when you reach them.

You may also need to move to a bigger hosting package, such as a VPS (virtual private server) or a dedicated server, where you manage a lot of the site’s back-end nitty-gritty details.

If you’re especially worried about a new host, most companies offer a money-back guarantee (usually 30 days). While you wouldn’t want to move your site and then have to move it again, it’s good to know that you can if it’s not a good fit. 

If you run a simple WordPress site, one option is to host directly from WordPress, where you can even keep your own domain name (for a small annual fee). You’ll be freed from all the worries of maintaining WordPress, but there are limits to which plug-ins you can use, and you can’t sell advertising on your site (and WordPress may display ads on your site).

Moving your domain name

If your domain name is registered with your hosting company, you’ll need to move it—but don’t worry, your host will have instructions for this. If you’ve registered it with a different company, all you’ll need to do is change the name servers when your new site is up and running. 

While it may cost a bit more, having your domain managed by a company different from your host has a lot of advantages, especially if you have multiple domains. I use Hover for my domains, which means I don’t have to worry about hosting companies that make it difficult to move domains. Make sure you can move the domain, and find out how long it will take, before you start moving your website. It may take several days to do this, and you don’t want to move your site, and get it set up, only to have to wait to be able to move your domain name. Once you’ve got the necessary authorization code to move the domain, you can go on to the next step.

Moving files to the new host

Once you’ve set up your new hosting contract and you’ve gotten your login information, start by moving your files. You should be prepared to not make any (or many) changes to your website for several days.

Move everything from your current host to the new host. This is a simple FTP transfer: Use your favorite FTP client and open two windows—one for the old host, and one for the new one. Copy everything. And be patient—if you have a lot of files, or many large files, this can take a long time.

export database

It’s easy to export your database in phpMyAdmin.

For any site that uses a MySQL database, you’ll need to export the database so you can import it to the new site. has a good tutorial explaining how to do this. It also tells you how to make a backup of your database, which is something you should do to make sure you don’t lose anything.

Setting up your website

There’s a lot of niggling setup work to get the new website up and running. Again, using WordPress as an example, you’ll need to create a new MySQL database on the new host, and import your existing database. You then edit the wp-config.php file with the name, password and hostname for the new database server.

wordpress config

You don’t need to change much in WordPress for your new site: just four lines in the wp-config file.

For other platforms, there are similar steps to carry out. You new host will have support documents that will help you do all this, and your platform will also have help files. (WordPress has another great tutorial for this.)

Moving email

If your hosting company manages your domain name, there’s a good chance that your email runs on their servers. That, too, needs to be moved. Just as you’ll have two websites running for a short time, a good way to make sure you don’t lose any email is to have two accounts operating concurrently. If your email is hosted elsewhere, all you’ll need to do is change some DNS settings when the new site is up (or not, depending on how the email provider handles DNS). Your email host will have information about this.

First, back up all your email.

new email account

Create your new email account in Mail’s Accounts preferences. 

Next, find the email settings for you new host. Set up a new account with those settings. (This Apple support document explains all the email settings and what they mean.) Until you move your DNS (more on that in a bit), you won’t be able to connect to this account, and even after you switch the DNS it won’t connect right away. But you’ll want to check your old account and your new account until you can no longer connect to the old one. Even after that, you may still have email, and you’ll then need to find the numerical IP address that allows you to connect to that account and enter it in your email client’s settings. It may be enough to check your old host’s webmail to find any messages you didn’t get at the new account, but if you don’t get a lot of email, this might be sufficient.

Once you’re sure that your new email account is the one getting messages—to check, send yourself test emails, and have some of your friends, ideally in other countries, do the same—you can delete the old account, making sure to copy any emails you need to keep from that account to the new one.

Switching your DNS

Now comes the tricky part. One your new site is up and running—your host will give you a way to access it, usually using a numerical IP address—and you’ve made sure that all your content displays correctly, it’s time to flip the switch.

move domain

When you move your domain name, you need to enter new nameservers, so every device using the internet can find your website.

DNS (domain name system) records the links between a domain name (such as, for my site, and its numerical IP address. When you change the name servers for your domain, you tell one server that the domain has moved. This server tells others, which tell others, each one sending updates at a certain frequency. Some name servers update often—say, every hour or so—and others only once a day. As the change propagates throughout the world, some users will see your new site, but others will continue to see the old site. It can take between 24 to 48 hours for these changes to get to all the name servers around the world.

The best thing to do is not make any changes to your site during this period. If you do make changes, you’ll need to replicate them on each site. You can use a site like to check the propagation of your DNS change. When all of the severs show your new IP address, you can let out a sigh of relief, and start updating your site on the new server.

What’s next?

After everything is set up, it’s time to cancel your old hosting contract, and delete all your files and email accounts.

If all goes well, your site should look exactly the way it did before, and you should be able to post as you did before, and get and receive email. Naturally, there are plenty of things that can go wrong, and your new hosting company should be able to help you if anything unplanned comes up. In fact, that would give you the perfect opportunity to test how reactive their support is.

Subscribe to the Best of Macworld Newsletter