Updated for 2021
Migrating a WordPress website in 2021 is not all that much different than migrating one in 2020 or 2019. If you already know how to migrate a WordPress website, you might want to skip this post.
We often get requests from clients, and even other web designers, asking how to migrate their WordPress websites. The process can be a bit too technical for some users. We’ve migrated over 500 WordPress websites over the years, so we thought we’d share what we’ve learned.
Table Of Contents
- Migrating WordPress Websites to a New Host
- Migrating WordPress to a New Domain
- Migrating WordPress Websites with SSL Certificates
What to know before you begin migrating WordPress websites
The process of migrating WordPress websites is straightforward but can be tricky. One little mistake, and you’ve botched the job. A failed WordPress migration could result in missing images, error messages, broken functionality, or a website that doesn’t load at all.
This can occur for several reason
- If the new server isn’t compatible with the scripts you’re using.
- If you failed to update the wp-config.php file with the new database credentials.
- If your files didn’t migrate properly.
- If the database failed to migrate properly.
Migrating WordPress Websites to a New Host
Download Your WordPress Website Files
The first step to migrating WordPress is to get your files. This is actually the easiest part, and there are a few ways to do it.
The next step is to take a copy of your database. You can do this using a WordPress plugin, like UpdraftPlus, or by logging into your web hosting panel and downloading your database SQL file. Many hosts provide a tool called phpMyAdmin to achieve this.
When you open phpMyAdmin, you’ll find your database on the left column. Click it, and then you’ll be able to select an option to Export it.
Wait for everything to finish downloading to your computer. Once you have your SQL database file and website files (either a folder with your entire website, or a zip file), you’re good to go.
Confirm you have this and then you’re ready to head over to the new web hosting.
Uploading Your WordPress Website
Log into your new hosting. If they offer cPanel, you can upload a zipped copy of your website through the File Manager.
Navigate to the domain’s folder and then select upload at the top of the of the screen. This will open a new window where you can select which files to upload. Select your website zip file.
Note: This is only going to work if you have zipped your website.
After the zip file is uploaded, you’ll see it listed among the files. Right click on it and select Extract. This will unzip the entire website to wherever you selected.
Alternatively, you can use FileZilla to upload your website files to the new server.
Linking WordPress to the New Database
Before you can begin this step, you need to create a new database and database user. Most hosts have some type of database wizard to do this. Here’s a tutorial on how to create a new database in cPanel.
While going through this process, be sure to take a copy of the following information:
- Your database name
- Your database user
- Your database password
- Your database host (many times this is localhost, but not in all situations)
Open up the file called wp-config.php. This is located in the main directory for your website. Typically, you only need to update four (4) lines of text. See below.
Migrating WordPress to a New Domain
If you’re just updating your domain, and not changing hosting platforms, the process is shorter.
Preparing the Hosting
You’ll need to make sure your hosting is prepared to use the new domain. Usually this involves pointing the DNS (domain name settings) to the correct place, and adding or assigning the domain to a folder. Here’s how to add an extra domain to your cPanel.
First, take a full back up of your website. We recommend UpdraftPlus or your cPanel’s backup tool for this part. Both are quick and semi-automated.
Next, install Go Live Update URLs, a free WordPress plugin that makes it painless to update your WordPress website domain.
Now you’re ready to go.
Go to your WordPress admin area, and to the main settings page. You’ll see two boxes with your current domain name. Add your new domain here and hit update. The page is going to refresh and you’ll be logged out. This is normal. Go ahead and login. Your username and password for the new domain will be the same as it was on your old domain.
The next step is to update your database using the Go Live Update URLs plugin. On this page, put your old domain in the first box, and the new domain in the second one. Apply the changes. This updates most of your database calls. Unfortunately, if you’re using certain page builders, you may need to go through and manually update certain widgets.
Before you walk away, it’s important to double check your work.
- If your website uses a caching plugin, clear your site cache. This ensures that the website is showing the most accurate information.
- Open your website up in a new browser window, using incognito mode.
- View the source code (don’t know how?).
- Do a search
CTRL+Ffor your old domain. You should get zero results.
If you do find your old domain in the source code, then there’s a chance something went wrong in the update, or your site theme/plugins may require additional manual steps.
Migrating WordPress Websites with SSL Certificates
When your website has an SSL certificate (https://), there’s extra steps involved with the migration. This will vary based on how you secure your website. If you purchased an SSL certificate, it should be transferable to other web hosting platforms. If your current SSL certificate was provided for free by your host, you probably can’t transfer it.
Migrating WordPress with SSLs
If your site has an SSL, it’s very important that you get the SSL certificate re-keyed (if you’re reusing it), or to have a new SSL certificate ready at the new host. Once you do, you’re ready to complete the website migration as mentioned above.
The next step is a time-sensitive one.
As soon as you update your domain settings, start attempting to apply your SSL certificate at the new hosting. If your migration is completed, but the SSL isn’t applied to the new hosting, you’ll get a security error alert/warning like this. This is not something you want your visitors to see!
While we’re always eager to empower business owners to manage their own websites, there’s too much at stake with this type of migration. If your website is important to your business, we’d recommend hiring a professional if you’re migrating a WordPress website with an SSL.
You’re Ready to Migrate Your WordPress Website!
With the guidance above, you’ll be equipped with the knowledge to complete your own WordPress migration. If you’d like our assistance with moving your website to a new server or domain, we’d be happy to assist. Contact us for more information.