Hopefully, you’re happy with where your WordPress website sits on the web. But if that were true, you probably wouldn’t be reading this right now. It’s time for a change.

You might be dissatisfied with your current hosting provider and want to move your site to a new host without disruption. Maybe you bought a more authoritative domain, or you just want to rebrand with a new name and URL.

Whatever your reason, moving your site will ultimately help your online presence in the long run, so it’s best to do as soon as you can.

As the site Administrator, you might feel intimidated by all this. Not to worry — this guide will explain how non-developers can easily migrate all content from a WordPress site to a new domain or host.

Learn More About HubSpot's CMS Software

How to Migrate a WordPress Site

How you migrate your WordPress site will depend on whether you’re switching domain names or web hosts. Both can be performed with the help of a WordPress migration plugin, but be sure to follow the instructions for your specific case.

Here, I’ll explain how to change your WordPress website domain name or host with Duplicator, a free and powerful WordPress migration plugin. Duplicator handles most of the transfer work you would otherwise need to do manually, saving you time and reducing the chance of an error.

The primary goal when changing domains is to minimize the negative impact on SEO and site traffic. You should expect at least a minor drop in both of these as search engines and users learn about the new address. However, if migrated properly and cautiously, your site should draw more people than ever. Here’s how to do it:

1. Back Up Your Website Files

This first step might be the most important in the whole process. You’ll need a full backup of your WordPress site to upload to your new domain. A backup also prevents significant data loss in the case of an accident with the transfer.

A full backup involves downloading all files of your website onto your local device, including your database (containing all your website’s content and data) and static files (including WordPress core files and theme files). These files need each other to complete a fully functional site.

To back up your files with the Duplicator plugin:

1. Install and activate the Duplicator plugin by choosing Plugins > Add New from your WordPress dashboard.

2. Once activated, you’ll see a new Duplicator option in your WordPress dashboard panel. Select Duplicator > Packages.

3. In the Packages » All screen, click Create New.

4. Give your new backup a name, then click Next.

the name backup window in the WordPress migration plugin Duplicator

5. After Duplicator completes a site scan, click Build. This will take some time depending on the size of your site.

6. Once the backup file is built, select the One-Click Download option. This downloads both your backup file and the installer.php file to your device. installer.php will be used to restore your backup to your new domain.

Once downloaded, make a copy of your backup file and store it in a safe place, in case something goes wrong and you need to restore it.

2. Create a Database for Your New Domain

We now need a database linked to the new domain. This is where you’ll upload your WordPress website files. If you already have a database set up with your new domain, you can skip this step.

The easiest way to create a database is using cPanel, which comes included with most hosting providers.

To create a new database with cPanel:

1. Log into your hosting account and navigate to the cPanel main menu.

2. Under Databases, select MySQL Databases.

the database selection window in cPanel

Image Source

3. Under Create a New Database, enter a name for the database and click Create Database. Save this name for later.

4. Add yourself as a user to modify the database. Under Add a New User, enter a username and password, then click Create a User. Save these credentials for later.

the add user window in cPanel

Image Source

5. Scroll down to Add a User to a Database, choose the user and database you just created from the dropdowns, then click Add.

6. On the Manage User Privileges screen, check the ALL PRIVILEGES box to give yourself full access to the database, then click Make Changes.

3. Upload Backup Files to the New Database

In this step, we’ll populate the new database with your WordPress website files, using both cPanel and Duplicator.

To upload your files to your new database:

1. Under Files, select File Manager.

2. In the File Manager Directory Selection window, select the option Document root for and choose your new domain from the dropdown, then click Go.

the file manager window in cPanel

Image Source

3. Select Upload from the top toolbar to upload your site backup file and installer file.

4. Go to domain.com/installer.php, where “domain.com” is your new domain name. You’ll see the duplicator installation wizard, thanks to the installer.php file. Click Next.

5. Enter the name of the database you created for the file upload, then your username and password to access the database. Click Next.

the install database window in the WordPress migration plugin Duplicator

Image Source

6. On the next screen, Duplicator will automatically fill in the URL field with your new domain. Click Next.

7. On the final screen, click Save Permalinks, then Test Site to review your site in its new location.

the test site window in the WordPress migration plugin Duplicator

Image Source

4. Redirect Your Old Site to Your New Site

You’ve done the heavy lifting by placing your files in your new domain. But what about your old domain? If this old domain still points to your old website, visitors and search engines won’t know how to access your new domain, which hurts your SEO.

The solution is to make your old domain send users to your new domain with permanent 301 redirects, so visitors land on your new domain after typing the old one into their browser. To work properly, every page on your old site should redirect to its new counterpart.

To redirect your old WordPress site to your new site, you can use one of many redirect plugin options to handle the coding for you. Alternatively, you can quickly take care of 301 redirects with a bit of light coding. Log into the backend of your old WordPress site and add the following code to the top of the .htaccess file, stored in your root directory:

 

#Options +FollowSymLinks

RewriteEngine on

RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]

where newdomain.com is your new domain name. Lastly, save the file.

Test your redirects by entering your old website URL into your browser. All URLs using your old domain, including all subdirectories and slugs, should redirect to your new domain. If redirects aren’t working, contact your hosting support.

5. Clean Up Your New WordPress Site

Though your site might appear working in your new domain, there are likely some small bugs left over from the switch that you’ll need to address. First, find and fix any broken links on your new website resulting from the domain change.

Next, change all internal links to your new domain. Otherwise, these links will just send people back to your old domain. We recommend using a plugin like Better Search Replace to track down these faulty links and update them quickly.

Finally, complete a manual sweep of your entire site. Review every page, plugin, and site setting to ensure your site looks and works as intended. If you find that images or other media aren’t showing, you can either replace them manually or use your find-and-replace plugin to make all image links refer to your new domain.

6. Update Your Visitors and Google About Your New Domain

Your website is ready to go on the new domain. Congratulations!

But before going off to tell all your friends and family, we recommend telling Google about your recent change. This step is important for showing your new website in Google results pages.

You can update google through Google Search Console, a free tool for optimizing your website’s organic search presence. See Google’s guide to the Change of Address tool to optimize your new domain with Google Search Console.

Finally, don’t forget about your visitors! While 301 redirects will channel all traffic to the right place, you might want to personally inform your users of the domain change. You can do this with an email to subscribers, a front page message, a blog post, and/or a social media post.

The process of moving from one host to another is similar to switching domains, but there are some important differences. Here’s how to switch hosting providers for your WordPress site:

1. Set Up Your New Hosting Account

First, find a new hosting provider that better suits your needs. For help in your search, see our list of the best WordPress hosting providers.

Many hosts offer migration assistance free-of-charge. This service can make the transition much easier, so take this option into account when browsing alternatives.

2. Back Up Your Website Files

Download your current WordPress site files onto your device in order to re-upload them to your new host. You can also reinstall your backup and try again if an accident occurs.

To back up your files with the Duplicator plugin:

1. Install and activate the Duplicator plugin by choosing Plugins > Add New from your WordPress dashboard.

2. Once activated, you’ll see a new Duplicator option in your WordPress dashboard panel. Select Duplicator > Packages.

3. In the Packages » All screen, click Create New.

4. Give your new backup a name, then click Next.

5. After Duplicator completes a site scan, click Build. This will take some time depending on the size of your site.

6. Once the backup file is built, select the One-Click Download option. This downloads both your backup file and the installer.php file to your device. installer.php will be used to restore your backup to your new domain.

Make a copy of your backup file and store it safely throughout the rest of the migration.

3. Transfer Your Website Files to the New Host

For this step, you have two options. If your hosting provider offers migration service, follow their instructions, and then move on to the next step.

If your host does not offer this service, you’ll need to create a database on your new hosting server to place your WordPress files. This is most easily done with cPanel, available with most popular hosting providers. Then, Duplicator will handle the rest of the transfer for you.

To place your website files on your new host server:

1. Log into your hosting account and navigate to the cPanel main menu.

2. Under Databases, select MySQL Databases.

3. Under Create a New Database, enter a name for the database and click Create Database. Save this name for later.

4. Add yourself as a user to modify the database. Under Add a New User, enter a username and password, then click Create a User. Save these credentials for later.

5. Scroll down to Add a User to a Database, choose the user and database you just created from the dropdowns, then click Add.

6. On the Manage User Privileges screen, check the ALL PRIVILEGES box to give yourself full access to the database, then click Make Changes.

7. With a database set up, you can upload your WordPress backup files. In cPanel, upload your site backup file and installer file to your root directory.

8. Go to domain.com/installer.php, where “domain.com” is your new domain name. You’ll see the duplicator installation wizard.

9. Enter your database name, then your username and password that you just created (Host can stay as “localhost”).

10. Click Test Connection. If the test runs properly, you’ll see the following:

the test connection window in Duplicator, a WordPress migration plugin

Image Source

11. Click Run Deployment.

12. The next screen will show your old and new URLs, which should be the same if you’re keeping your old domain. Click Run Update.

13. On the final page, follow the testing suggestions if you’d like.

4. Point Your Domain to Your New Host

Now that you’ve recreated your site on a new host, you need to change your domain name to direct users to your new site location. Otherwise, your URL will send visitors to the old website.

Your host will give you at least two nameservers, which connect your domain name to the server where your content is hosted. Most hosts provide these in an accessible place in your account.

After acquiring your nameservers, log into your domain registrar and replace the nameservers of your old host with those from your new host. You’ll need to wait anywhere from a few hours to a couple of days for your domain to point to your new site for all users.

5. Check Your New Site

Visitors should notice no changes to your website while you switch hosts — after all, the content itself hasn’t changed, only where it’s stored. Even better, assuming no major issues with the transfer, your site will experience zero downtime during the migration.

That said, it’s good practice to check as many pages as you can to ensure all content transferred properly, and replace any missing files or content if needed (remember your backup?).

Don’t Fear the Transfer

With your migration complete, you can work to continue to build out your online presence in its new home. All it took was an hour or two of your time and a handy plugin.

You might even consider making a WordPress staging site, now that you’re a site-migration whiz. A staging site is a hidden copy of your public-facing website you can use to test out changes and updates. Moving content from your test domain to your official domain should now be a breeze.

Discover videos, templates, tips, and other resources dedicated to helping you  launch an effective video marketing strategy. 

 cms software

Originally published Jun 30, 2020 7:00:00 AM, updated June 30 2020

Topics:

WordPress Website