Do you want to learn how to migrate a WordPress site to a new server or domain name?
Instead of manually moving all your WordPress content, the Duplicator plugin can seamlessly migrate your website to another location. This can help you update your hosting or website framework without downtime.
In this tutorial, we’ll show you how to migrate WordPress sites easily!
When You Might Need to Migrate Your Website
When you migrate a website, you’ll move your entire site to a different location. Usually, this is a large change like using a new host, server, or domain.
If you just started your first website, you likely won’t need to perform a migration. However, you may need to eventually make this change.
Over time, you can start increasing your online traffic. Your old host may not be able to support this higher volume. In this case, it’s a good idea to find a new WordPress hosting provider or upgrade your hosting plan.
During this process, you won’t want to lose any of your website’s content or traffic. To make a smooth transition, you can migrate your website.
Here are some common reasons why you might need to migrate your website:
- Moving to another web hosting provider
- Changing your domain name
- Going from an HTTP to HTTPS site URL
- Moving to a different Content Management System (CMS) or framework
- Building a staging site
A WordPress site migration can also be helpful when you’re changing your website’s design, navigation, or structure. You can simply move your site to a local server for safe testing and updates. Then, migrate these changes back to your live server.
How to Migrate a WordPress Site Easily (Beginner’s Guide)
As a beginner, you might not know exactly how to migrate a WordPress site safely. To help you get started, we’ll walk you through this process step by step!
Method 1: Migrating a WordPress Site With a Plugin
If you manage an e-commerce store or WordPress blog, you’ll want to find the fastest way to move your content. Fortunately, there are many WordPress migration plugins available to make this process easier.
Step 1: Install Duplicator
Duplicator is a popular and flexible tool for migrating, cloning, and backing up your website. With this plugin, you can create packaged bundles of your site and smoothly upload files to a new server:
During a manual migration, you might be worried about downtime or data loss. Using Duplicator, you can safely move your site to a different domain or hosting provider. This makes it one of the best WordPress migration plugins you can find.
When you’re ready to migrate your website, simply sign up for a Duplicator subscription. With Duplicator Pro, you can access unlimited migrations, drag-and-drop installs, and cloud storage integrations.
After downloading Duplicator, open the WordPress dashboard for your original site. Then, install and activate the plugin.
You’ll also need to activate the license key you received with your purchase. To do this, go to Duplicator Pro » Settings » Licensing. Paste your license key and hit Activate:
Tip: Before you start migrating your site, we’d recommend disabling any caching plugins. Often, these can cause errors during the migration process.
Step 2: Build a Package
After the previous step, it’s time to create a new package in Duplicator. This is a bundle of all your site’s content, plugins, themes, database, and WordPress files.
First, navigate to Duplicator Pro » Packages » Create New:
If you want to start the migration process even faster, you can create a package in the new Duplicator dashboard widget! After you update your plugin to the newest version, click on Create New in your dashboard:
At the top of the package editing page, give it a name. Although you can customize the Archive settings, avoid filtering tables or core WordPress directories. To continue, hit Next:
The Duplicator plugin will then check your website’s setup for any issues. If you see Good notices for every setting, click on Build:
As Duplicator builds your package, you can track its progress. You’ll know the files are ready to download when they appear on the Packages page.
To migrate your website, you’ll need to download the zip file that contains your site’s data. Next to the package you just created, click on Download » Archive (zip).
Step 3: Import Your WordPress Site
Once you download your website files, find the WordPress login credentials for your second site. In your new dashboard, install and activate Duplicator Pro. This will allow you to import your core data without needing a File Transfer Protocol (FTP) client or phpMyAdmin.
Next, click on Duplicator Pro » Import. Here, drop your saved archive file into the import box:
You’ll see a list of information about the package you imported. If everything looks correct, hit Continue:
Before you replace the current site with the original content, consider setting a recovery point. Essentially, you can create a package of the current site to revert to if anything goes wrong. Once you build a new package, select it as a recovery point:
However, you may not need a recovery point for a completely new website. To migrate your old site to this new location, click on Launch Installer:
On the next page, select Full install single site as the Install type. This will completely clear the current site and replace it with your original files:
Then, click on Validate. After you review any notices and warnings, select the terms and notices checkbox and continue to the next page:
Lastly, you’ll need to confirm the installation settings. Make sure the WordPress database parameters are correct before hitting OK. This will override the new database:
Now Duplicator will migrate your previous WordPress website to the new location! Keep in mind that if you’re migrating to a new domain, you may also need to update your Domain Name Server (DNS).
Method 2: Migrating a WordPress Site Without a Plugin
If you don’t want to install a new plugin, you can also migrate your site manually. However, this method is best for more advanced WordPress users. For beginners, we’d recommend using a migration plugin like Duplicator to move your content quickly and safely.
In a manual migration, you’ll need to access and edit your site files and database. Before you get started, it’s important to back up your website. This way, you can easily revert to a recovery point if you accidentally break your site.
Fortunately, Duplicator also works as a backup plugin. After packaging your files and database, download them to your local computer. Then, feel free to continue migrating your website.
It’s also important to keep in mind that many web hosts offer free migration services. This can prevent you from having to perform this process manually.
Step 1: Export Your Database
First, start by exporting your database. If your original site is live, sign into phpMyAdmin to manage your database. For a localhost, you can use MySQL Workbench instead.
In this tutorial, we’ll be using phpMyAdmin. First, click on the Export tab at the top of your dashboard:
For the Export method, select Quick. The Format should be SQL. After these settings are correct, hit Go:
After the database downloads, save the file to your local computer. If your new web host also uses phpMyAdmin, zip the file.
Step 2: Upload Your Site Files to the New Server
After the previous step, log into the file manager for your original hosting account. Depending on your host, this could be cPanel or a custom-branded manager. Alternatively, you may have to use an SFTP/FTP client like FileZilla.
Then, select all of the files in the root folder, or public_html. This includes important files like wp-admin and wp-content. Right-click on them and hit Download:
After downloading your site files to your local computer, compress them into a zip file.
Now you’ll need to go to the file manager for your new site. Open the root directory, select all of the files, and delete them:
Once the root directory is empty, hit Upload. In the upload box, add your zipped file:
Lastly, extract the zip file. After this step, you should see the files from your original site.
Step 3: Create a New Database
To store your site’s data, it’s important to create a new MySQL database. If you’re using cPanel, start by finding the MySQL Databases button:
Then, give the database a name and hit Create Database:
After creating a database, you’ll need to create a new user with rights to control the database. Under MySQL Users, add a username and password for the new user:
Now it’s time to assign the user to the database. Find the Add User To Database section. Here, select the user and database you just created:
It’s important to also enable permissions for the user. Make sure to check the box next to Select, Insert, Update, Delete, Alter, Create, Drop, and Index:
This will allow the user to make changes to the database. Once you save these settings, continue to the next step.
Step 4: Import the Original Database
Next, open phpMyAdmin for the new site. At the top of the page, select the Import tab.
Now you’re going to import the database that you saved earlier. Under File to import, upload your saved SQL file:
Make sure the database is a zipped SQL file. Then, import the new database.
Step 5: Update the wp-config.php File
After a manual migration, you’ll need to update a few values in your new site’s wp-config.php file. To do this, reopen the file manager for your new site. Then, find the wp-config.php file in the public_html folder.
In the wp-config.php file, locate the database settings. You’ll need to redefine the database name, username, and password values to match your new site.
Here are the values to update:
- db_name
- db_user
- db_password
You’ll also need to search this file for your old domain name. Delete this text and replace it with your new domain. Similarly, search for your old URL path and add your new one.
Frequently Asked Questions (FAQs)
Let’s answer some common questions you might have about migrating a WordPress website!
How do I migrate my WordPress site for free?
You can migrate your WordPress site for free using the free version of Duplicator. After creating a package, download both the archive and installer files.
Then, you’ll need to upload these files to the new server. To help you get started, check out our guide on website cloning. You can follow these same steps to migrate your site.
Does migrating a site affect SEO?
Migrating your website can temporarily affect your Search Engine Optimization (SEO) rankings. When you start using a new web host, you’ll have an entirely new IP address and server location. Search engine bots will re-crawl your website, which could impact SEO and organic traffic.
However, you can easily migrate your site without losing SEO. The Duplicator plugin can help you safely move your content to a new location. Then, be sure to set up permanent redirects and notify Google about any domain changes.
How long does it take to migrate a WordPress site?
Migrating a WordPress site can take just a few minutes with the right tools. Using Duplicator, you can quickly package your site files and database. To migrate this data to another WordPress site, simply drag and drop them into the Import box.
What is the best WordPress migration plugin?
Duplicator is the best WordPress plugin for quick and easy migrations. You can use this tool to drag and drop your website to a new server, domain name, or any other location that hosts WordPress.
Alternative: All-in-One WP Migration is another effective plugin for migrating WordPress sites. However, Duplicator Pro is better equipped for handling larger sites and WordPress multisite networks.
Conclusion
Hopefully by now, you know how to migrate a WordPress site!
During your website migration, you may run across errors. If you want to avoid losing any of your hard-earned site data, consider setting a recovery point.
Do you want to avoid the hassle of a manual migration? Download Duplicator Pro to access drag-and-drop WordPress installations!