In this blog, you're going to learn how to migrate WordPress and your Elementor content to a new host and/or a new domain name with Duplicator - free plugin makes the entire process easy and is a great option for most situations.
This tutorial will help you if you're:
- Changing hosts while keeping the same domain name.
- Changing your site's domain name while also changing hosts.
- Moving a site from your local or development server to a live server.
Ready to start migrating? I'll begin with an in-depth tutorial for migrating your site with the Duplicator plugin.
How to Migrate WordPress With the Duplicator Plugin: Step-By-Step
The nice thing about using the Duplicator plugin is that, in addition to moving your site's files and database for you, Duplicator can also handle general database serialization issues and can replace URLs in your site's database (if you need to change your site's domain name as part of the process).
Step 1: Some Preliminary Housekeeping
Before getting started, you'll want to get some basic housekeeping out of the way.
First, always take a full backup of your site before migration. Moving your site involves working with some delicate areas, so you always want to have a backup just in case.
Second, if you're moving your site to a new domain name, you'll want to make sure that you've already changed the new domain's nameservers to point to the host to which you're migrating your site.
Third, make sure that you have the hosting credentials for the host to which you want to migrate your site. You'll need to be able to upload files to your server and create a new database.
Finally, go ahead and install and activate the free Duplicator plugin on the site that you want to migrate.
Now, let's get started.
Step 2: Create a New Duplicator Package
Once you've installed and activated the free Duplicator plugin, you need to create a “Package”, which is basically a portable copy of your entire site.
To create a package, go to the Duplicator tab in your WordPress dashboard and choose Create New:
On the next screen, you can leave the values as the defaults. Just click the Next button:
Duplicator will then scan your site for potential issues and should hopefully come back with all “Good”. If it does find potential issues, you can expand the accordion tab to learn more.
One potential issue is the size of your site. If your site is especially large (“2GB+ on most budget hosts & 10GB+ on higher end hosts”, according to the Duplicator team), you might need to purchase Duplicator Pro because it's better suited for large sites.
Assuming everything looks good, click the Build button to finish the process and create your site's package:
Once the build process finishes, which might take some time for larger sites, Duplicator will give you two files to download:
- A zip file archive
- A PHP file called installer.php
Download these two files to your computer and keep them handy because you'll need them in the next steps:
Step 3: Create New Database at New Location
Next, you need to create a new, empty database at the host to which you want to migrate WordPress.
If you're using a host with cPanel, you can do that from the MySQL Databases area in cPanel:
First, give your database a name:
Then, after you've created the database, create a new database user/password and then assign that user to the database that you created:
Make sure to give the user All Privileges and keep the database name, database user, and database user password handy because you'll need them soon:
Step 4: Upload Duplicator Files to New WordPress Location
Next, use FTP or cPanel File Manager to upload the two files from Duplicator to the directory where you want your migrated WordPress site to be.
Remember, it should be one zip file and one file named installer.php.
Step 5: Run Duplicator Installer to Set up Site
Once you've uploaded those two files, you're ready to run the installer process to finish your migration.
If you're migrating your site to a new domain name, you can just go to yournewdomain.com/installer.php (assuming you've already changed that domain's nameservers).
If you're keeping the same domain name but just moving your site to a new host, you won't be able to do that because your domain's nameservers are likely still pointed at your previous host. A nice workaround here is to edit your computer's hosts file. This lets you force your computer to connect your domain to your new host, even before you change your domain's nameservers. This Pagely article explains how to do it.
Once you open the installer.php file, you should see a setup wizard that will take you through the process. Click Next to get started:
After a short wait, while Duplicator extracts your site's files, you'll be prompted to enter the database credentials that you created in Step 2. After entering the credentials, click Test Database to make sure that they work:
If everything looks good, you'll be able to click Next to continue:
After Duplicator imports your database, it will give you the option to Update Data. This is an important consideration because it lets you update the URLs in your WordPress site's database to reflect any changes to your domain name.
Duplicator should automatically detect any changes to your domain name and fill in the fields accordingly. However, make sure that the information in the URL field matches the domain that you want to use on your newly migrated site:
Once you've verified that the information is correct, click Next.
Then, you should see a prompt to log in to the admin area for your newly migrated site:
After you log in for the first time, Duplicator will automatically delete the migration files and clean everything up.
Step 6: Find and Replace Urls in Elementor Content (If Changing Domain)
While Duplicator will handle replacing URLs for most of your site's content, you might also need to replace URLs using Elementor's built-in tool if you changed your site's domain name and your Elementor content isn't working after the migration.
To access this tool, go to Elementor → Tools. Then, click on the Replace URL tab.
Enter your old domain name in the box on the left and your new domain name in the box on the right. Then, click Replace URL:
Step 7: Regenerate Elementor CSS
At this point, your site should be working. However, to make absolutely sure that everything is functioning properly, you can finish things out by forcing Elementor to regenerate its CSS files.
To do that, go to Elementor → Tools and click Regenerate Files:
And that's it!
You'll still want to give your site a thorough test, but it should function exactly as it did before the migration process.
Any Questions on How to Migrate WordPress?
Do you have any questions on how to safely move WordPress sites that you've created with WooVina theme and Elementor to new hosts and/or domain names? Please don't hesitate contact us.