Skip to content

Get three months for $1. Code: 3moforadollar

Start Free

Premium Data Host

How to migrate a WordPress site to a new host.

To migrate a WordPress site, back up the files and database, copy them to the new host, update wp-config.php with the new database details, test the site, then switch DNS last. Keep the old host live until the new one works. Email does not move with the site, so plan for it too.

If you would rather not do it yourself, EasWrk will copy your site for free.

  • Eight steps
  • Old site stays up until the end

The steps

Eight steps, in this order.

The order is what keeps the old site running while you build the new one.

  1. 01

    Back up everything

    Download a full copy of your site files and export your database. Keep both somewhere other than the old server. If a later step goes wrong, this is how you go back.

  2. 02

    Note what you run

    Write down your WordPress version, the PHP version on the old host, your active plugins and any custom settings. Set the new host to a PHP version your theme and plugins support.

  3. 03

    Lower your DNS TTL

    The TTL is how long other networks remember your domain’s address. Lower it at your DNS provider some time before the move, ideally a day ahead, so the final switch spreads quickly.

  4. 04

    Set up the new hosting

    Create the account on the new host and add your domain to it. Do not change your live DNS yet.

  5. 05

    Copy the files and the database

    Upload your files to the new site’s folder. Create a new empty database and user, then import your export into it.

  6. 06

    Update wp-config.php

    Edit the wp-config.php file so it points at the new database name, user and password. If the site address is changing too, update it with a tool that handles serialized data, and never edit the GUID column.

  7. 07

    Test before you switch

    Look at the new site before the public does. A common way is to point your own computer at the new server with a hosts file entry. Click through key pages, log in, and place a test order if you run a store.

  8. 08

    Switch DNS, then check

    Point your domain at the new host. Move or re-point your email too, or mail will stop arriving. If any page address changed, add a 301 redirect from the old address to the new one. Keep the old site and your backup for a while and check forms, logins and email.

What moves

What moves with a WordPress site, and what does not.

Copying the files is only part of the job.

What moves with a WordPress migration, and what does not
PartMoves with the files?What to do
Site filesYes, when you copy themUpload the WordPress folder, themes, plugins and media to the new host.
DatabaseNo, it is separateExport it, import it on the new host, then update wp-config.php.
EmailNoCreate mailboxes on the new host, copy the old mail, then change the MX records.
DNS recordsNoRecreate every record you still need if the DNS moves with the host. Lower the TTL first.
Domain registrationNoStays where it is unless you transfer it. A hosting move does not require a domain transfer.
Page addressesSame if the domain and paths stay the sameIf any address changes, redirect the old one to the new one with a 301.

The database

How to migrate a WordPress database

The database holds your posts, pages, settings and orders. It does not live in the site folder, so copying files alone leaves you with an empty site.

Export it from the old host, create an empty database and user on the new host, and import the export. Then put the new database name, user and password in wp-config.php.

If the web address changes, run a search and replace that understands serialized data. A plain find and replace across the whole database can break theme and widget settings. WordPress’s own migration guide warns about this and says never to change the GUID column.

Before you import

Create
Empty database and user
Import
Your export file
Edit
wp-config.php
Address change
Serialized-safe replace

Email

How to move email when changing web hosts

Email is the part people forget. Your mailboxes and your old messages sit on the old host, and your MX records tell the internet where to deliver new mail. Moving the website does not change either one.

Create the mailboxes on the new host first. Copy the old messages across with your mail program or an IMAP copy tool. Then change the MX records. Keep the old host until you have sent and received test messages.

If you cancel hosting too early, the mail goes with it. Bluehost’s own cancellation page says email and website services tied to the cancelled hosting are suspended.

Order for email

1
Create mailboxes on the new host
2
Copy the old messages
3
Lower the MX TTL
4
Change the MX records
5
Test, then cancel the old host

Choose your method

A plugin, a host, or a person.

A migration plugin can copy a small, simple site. You still do the DNS switch and the testing.

Your new host can often do the copy for you. Ask whether it is free, whether your old site stays online, and who handles email.

A store needs extra care. If customers are ordering while you move, plan for the orders that arrive on the old site after you copied it.

Before you start

Backup
Files and database
Versions
WordPress and PHP
DNS
Lower the TTL
Email
Know where it lives

Or let us do it

EasWrk moves it for free.

From a cPanel host, we transfer your files, databases and email for you. We copy everything to EasWrk first, get it working, and only then point your domain across.

Your existing site keeps serving visitors the whole time, and nothing is deleted from your old host until you say so. On a closed platform such as Wix, Squarespace or Shopify there is no server to copy, so our concierge team rebuilds the site by hand. Read how free WordPress migration works, or coming from GoDaddy or Bluehost specifically.

Questions

Questions about migrating a WordPress site.

How do I migrate a WordPress site manually?

Back up the files and the database. Create a database on the new host and import your export. Upload the files, point wp-config.php at the new database, test the site, and switch DNS last. The eight steps above cover each one.

How do I migrate a WordPress database?

Export it from the old host, create an empty database and user on the new host, then import the export. Put the new database name, user and password in wp-config.php. If the web address changes, use a search and replace tool that handles serialized data rather than a plain find and replace.

Can I migrate a WordPress site with no downtime?

The method here keeps the old site running while you build and test the new one, and you switch DNS last. DNS changes take time to spread, so keep the old host active until the new site and your email check out.

How do I move email when changing web hosts?

Email does not move with your files. Create the mailboxes on the new host, copy the old mail across, then change your MX records so new mail arrives at the new host. Keep the old host until you have sent and received test messages.

How do I move WordPress from Hostinger, SiteGround or another host?

The steps are the same on any host. Back up the files and database from the old control panel, build the copy on the new host, test it, then switch DNS. Do not cancel the old plan until the site and email work on the new one.

Can a plugin do the migration?

For a small, simple site a migration plugin may be enough. For a store, take extra care: orders placed on the old site during the move can be missed unless you plan for them.

Can I migrate a WordPress site for free?

Yes, you can do it yourself with the steps above. Or EasWrk will do the copy for you at no charge: from a cPanel host we transfer your files, databases and email, and nothing is deleted from your old host. See free WordPress migration.

Migrate WordPress

Do it yourself, or hand it over.

Both work. If you hand it over, it is free, your old site stays online, and WordPress hosting plans start at $45 a month with the first month free.

Start Free View Plans