Maybe your current host is slow, or you are moving your blog to a new domain. In both cases, you need a WordPress migration. It is the process of moving a WordPress site, with all its files and its database, from one place to another.
A migration can also mean moving a site from your local computer to a live server. Let's see what it involves and how to do it safely.
What Gets Moved in a WordPress Migration?
Every WordPress site has two parts. The files include WordPress itself, your themes, plugins and uploads in the wp-content folder. The database stores your posts, pages, comments, users and settings. A migration must move both parts together.
It is just like moving house. You pack the furniture (files) and the paperwork (database), then set them both up at the new address.
How to Migrate a WordPress Site
The easiest way is a migration plugin, such as Duplicator or All-in-One WP Migration. Many hosts also move your site free of cost when you sign up. If you prefer the manual way, here are the basic steps:
- First, take a copy of all your files and back up your database.
- Now, upload the files to the new server using FTP.
- Next, create a new database and import your database file using phpMyAdmin.
- Here, update the database name, username, password and host in
wp-config.php. - Finally, point your domain's DNS to the new host and test every page.
If you are also moving to a new domain, read our guide on how to change domain name in WordPress.
Don't change old URLs with a plain find and replace in the SQL file. WordPress stores some settings as serialized data, and a simple text change can break them. Use a proper search-replace tool instead.
I always keep the old hosting account active for a week after a move. DNS changes can take time to spread, and the old copy is a handy safety net.
With a good backup and a little patience, a WordPress migration is pretty simple. That's all for now. If you get stuck at any step, share it in the comment box below.