Migrating a WordPress site from one host to another is not hard and really only involves 2 parts: The file structure and the database. In this video tutorial I show you two methods to take a complete backup or copy of your Website and then how to move it up to your new host.
What the Video Covers:
- 2 methods of taking a complete backup/copy of your Website
- What settings may need to be changed and where to make those changes
- How to migrate both the Web files and database to your new host
Backup/Copy Method 1
This is my personal favorite because it is so easy! Using the Duplicator plugin, this tutorial goes over how to create and download a complete copy of your Website (both files and database) with just a few clicks (Learn how to install and configure the Duplicator plugin)
Backup/Copy Method 2
Don’t worry if you can’t get the plugin method to work, I also go over how to complete the backup/copy process using FTP and phpMyAdmin (a very common web-based tool used to access your database).
What You Need
- FTP Access to both the new and old hosts
- phpMyAdmin access to both the new and old hosts
- Database credentials for the new host (including the host address)
- The Duplicator plugin installed (if using this method)
Learn about and how to install/configure the Duplicator plugin in the How to Take a Manual WordPress Backup video
Hi there. I’m going to talk about how to migrate a WordPress website from one server to another.
Now, you may be upgrading servers or you may be changing hosting providers. Regardless, the process of migrating WordPress website is actually quite easy and that’s because there are only two parts that we have to worry about. And those two parts are the file structure and then the database.
In this tutorial I’m going to go two methods of taking a backup of the current website and then I’m going to show you how to install that on the new service provider.
The first method of taking a backup that I’m going to go over is using a plugin. Now, the duplicator plugin is a favorite plugin of mine. It basically allows you to take a complete backup of your website with a couple clicks of the mouse. Now, this is a complete backup in that it contains both the database and the file structure.
If you’re interested in learning more about the duplicator plugin, please see my video on how to take a manual backup of your WordPress website.
So now that we’ve taken a backup of our WordPress website we can simply download that to our local computer by clicking the Package button. Once that’s done we will have a complete backup of our WordPress website and we’re ready to install it on the new service provider.
However, before I go over how to install the site on the new service provider, let’s say that you don’t want to use the duplicator plugin or you can’t use the duplicator plugin. Maybe it’s incompatible with your current host. Or maybe you’re just not interested in installing another plugin right before you migrate your website. In order to do that we’re going to take a manual backup of our file structure using ftp.
Now, your current host should’ve provided you with ftp credentials so that you can access the file structure. You can use any ftp client you like. I particularly like FileZilla because it’s open source and free. However, any one will work here.
Once you’re logged into your ftp server, you can simply select the entire contents of your website, and then drag that down to your local computer. Depending on how large your website it, this may take some time, so be patient. However, once complete you’re going to have the first part of our backup, which is the file structure. Now we only need to deal with the database.
Taking a manual backup of your WordPress database is quite easy. The most typical method is using a tool called phpMyAdmin and your current host should have given you access information to this tool. Once you login you’ll see a screen like this, which is basically the structure of your current website database.
We’re going to go right over to the Export tab. Now, depending on the version of phpMyAdmin that your host is using, this screen may differ. But what you’re looking for is the Quick option, ensuring that the format is set to SQL and hitting Go. This is going to download a copy of your database to your local computer.
So at this point we’ve taken a copy of the file structure via ftp and we’ve downloaded a copy of our database via the phpMyAdmin tool and so we have a complete copy of our website on our local computer and we’re ready to start installing it on our new host.
Before we upload both the files and the database to our new service provider, we’re going to want to make some changes to just one file. So if we take a look at the folder that we downloaded our site to we’re going to see a file within it called wpconfig. Now, this file contains all the information about how to connect to our database. And it’s unlikely that the information remains the same between two different servers or two different hosting providers. So your new host probably provided you information to place into this file.
Now, within these video tutortorials, I typically like to avoid talking about or showing code. However, sometimes we have to open up a file and we have to make some changes. Now, the wpconfig file is very easy. It can be found in the root of your WordPress website file structure. And within it there’s going to be some settings. Your database name, your user name, your password, the host name. And these are the only changes that you’re going to have to worry about. Again, go ahead and update these settings as provided to your by your new host and save this file. Once we’re done editing this file we can go ahead and close these up.
And now we’re going to use ftp again to upload the files to our new hosting provider. Your new hosting provider should have provided you with updated ftp credentials. And once you’re logged in using your favorite ftp program, you can go ahead and select the entire file structure that you downloaded and then move that up to your new hosting environment.
Now, one note is that, if you use the duplicator plugin, remember, it created a backup of both the file structure and the database. And the database is held in this file called database.sql. You don’t want to upload this to your hosting provider, because we’re going to do something different with that. Now, if it gets uploaded, be sure to delete it or simply don’t upload it to begin with. Some would consider this a security risk. So definitely be careful about that.
So now that we’re moving our files from our local computer up to the new host, we have just the database to deal with now. Now again, the phpMyAdmin tool is the most common interface used by hosting providers and your new host should have given you access to this new environment.
Once logged in you’ll probably see a screen like this. And notice that, within this screen, it says, “No tables found in database.” And that’s because it is essentially an empty database and we have to import the previous database into it. It’s quite easy to do. Click Import across the top and choose the file that we downloaded. Depending on how you did this, this file may be located separate from your files. Or, if you used the duplicator plugin, again, it’s going to be this database.sql file.
Beyond that, everything in the screen can be left as their defaults. You can hit Go. Depending on the size of the database it can take a little bit of time to upload everything. However, you’ll notice that with this demo site, it is a small database, small website and it only took about two seconds. Now if we check the structure of our database we’ll see all the tables within it.
And at this point, both the files and the database are on the new server. At this point you’re basically ready to point your domain to your new service provider and test the website. Make sure it loads properly. The most common place of error is within that configuration file we talked about and ensuring that all the settings within there are correct. Beyond that, there’s a complete copy of your database and a complete copy of your file structure on the new server, and it should be working just fine.