How to migrate a wordpress site manually from online host to local host

by | Dec 10, 2018 | Web Design, Wordpress

Hi guys welcome to another WordPress migration video, this is Jamie from https://www.system22.net and https://web-design-and-tech-tips.com. Well in our last video we migrated a site using a plug-in called duplicator which is really easy to do, and if you can do it that way, do it that way, it’s really simple and straightforward. Sometimes that’s not going to work, there may be a PHP conflict, there may be a problem with the version of database that you’ve got going on. so we’re going to roll through how to actually do that the manual way, which is pretty much a fail-safe way.

So we’ve got this site online here as you can see, it’s online and what we’re going to do is we’re going to back up all the files from this site and download the database, and rebuild it on our localhost.

Now to do this, you may have already got it, but we’re going to need an app called xampp, and if you just google xampp it’ll bring up this page and you can download it. It’s very lightweight it won’t take up much space on your computer, there’s a Windows flavor a Linux flavor and a Mac flavor, just download whatever version you need and install it on your computer.

So once you’ve got it installed, we’re going to want to run this, and it’s going to be this little orange icon down here. Now, I’m using an older version which I probably need to update, but it’s been working so well for me I haven’t done it yet, so yours may look slightly different. Once you’ve run it this, you want to make sure that your Apache and MySQL are started, and if they’re not just hit the start button , that’ll be up here where it says stop. Okay, so we got that running.

First thing we want to do, obviously you’ve got to have the login credentials for the website that you want to move. You don’t want to go to the dashboard that’s not gonna help this time, you’ve actually got to go to the hosting provider itself. If you’re using something like GoDaddy, it’ll have a cPanel something like this, and you want to go to your file manager. Ifyou’re using a different one like Ipage, they’re slightly different, but they allhave the same , we’re going to be using the file manager and the MySQL database, we’ll do it with this one today so there’s a file manager and there’s MySQL, but probably going to be using the PHP myadmin.

First thing we want to do is go to the file manager for the site, let’s click on it and it takes us to the the folder, as you know, everything is usually in the public HTML.  

Here are all the files for the website that we want to backup, so what I’m going to do is I’m going to click on the first one and hold my shift key down and click on the last one, that’s going to select all of those files. Now what I want to do is zip these up, or compress them, so if we go up here we got compress, hit that. I’m going to ask it to do a zip archive. Click back on here and do a refresh or reload, so that’s created our WordPress admin zip, it’s giving it the name of that first file there, but, it has got all of these files inside of it, and what I want to do is click on it highlight it and hit the download button, and as you can see it’s downloading to my desktop there.You want to keep that safe somewhere, we’re going to need it in a minute.

Now I know because I’ve done it before, Ipage doesn’t let you compress files so you’re probably going to have to do this with a FTP client like FileZilla, which again is another free app, and if you just google FileZilla there it is and you can download it, and again it’s very lightweight and they’ve got one for all

Platforms. It’s what they call an FTP client which means file transport protocol, which which enables you to transport files from one place to another. Basically, when you open it you’ll connect and have your server files on the right-hand side, and your local files on your computer on the left-hand side. All you do is select them and drag them across so that’s an option if you can’t compress and download like we’ve done with this file here.

Okay so that’s step one, next thing we’re going to want to do is, we’ll go back to our cPanel. Here we’re going to want to download the database, and just to show you,  if you’re not sure what the database is

Called, let’s go down to a wordpress WP config file righ there, you see WP config, I’m going to edit it, and there’s a warning, obviously we’re not actually going to make any changes right now, but if you look down there, here’s the user, here’s the database password and at the top is the database name. That’s how to find the name of your database if you’re not sure what it was. Quite often you might be dealing with a client that has multiple sites on there,so there’s going to be multiple databases.

Back to the cPanel now, let’s go down a PHP myadmin and oncein there, it gives you a list of a few the databases that are here, the name of the one that we wanted was this one. I’m just clicking going to click on it.What we need to do is come up here and hit the export button, click display only the minimal options. We want it to be SQL, there are other options there but use SQL for this, and when you ready hit the ‘Go’ button.

Once downloaded we want to browse to where these files are, and keep them safe. So, I’m going to browse to those, and put them in a little folder because we’re going to want to use those in a moment. Okay so that’s the backup online  one.

Like I said earlier, once you’ve got xampp downloaded and installed on your computer, if you go to your main computer drive, C Drive usually, or whatever the drive letter is your main drive with all your  programs and everything on it. if you go down you’re going to see the xampp folder. Double click on there and inside locate the folder called htdocs that’s inside, that is where we put all of our websites that we’ve built locally, as you can see I’ve got a whole bunch here,you’ll probably only going to have a few folders there with things like restricted and PHP on there.

So, let’s create a new folder for the website that we want to download. I’m just going to call it f1 because I’ve actually already got that site here from when we did it the other way yesterday. Okay so it’s in the folder called f1, I’m going to open that folder, I’m going to copy over those zip file that we downloaded from our live site. I’m actually going to rename this because, when it unzips, I’ve got a folder inside that’s called WordPress admin and it’s going to put this in a folder called WordPress admin, and that might cause a problem so I’m just going to right click and hit rename, you call it a different name – really doesn’t matter what you call it as long as it’s changed it from the original.

So I’m going to right click hit ‘extract here’ and there we are! It’s extracted it all here, and what I’m going to do is delete that zip file we no longer need. So now basically we’ve got all of our website files right here.

Now then, our next step will be to keep this folder open, we want to go to our xampp software that we’ve installed here, and to do that wewant to go to our browser, just type in localhost and that will bring your xampp interface. Look for phpMyadmin and click on that. What you can do is create a new database if you want to, then you’ll have to create a user, but I’m going to go ahead to ‘users’, click on ‘users’, scroll down and I’m going to hit add user, I’m going to make this really easy. You want to use stronger passwords that I’m going to use here. I’ll just call it f1 it’s going to be the localhost, I’m going to use the password of f1, which is really weak, like I say you want to have a nice strong password for yours but I’m going to delete this site off both for live and the local later on, so it doesn’t matter.

If you want to generate a strong password, just click on that button there, so we’ve got a user name of f1 and we’ve got a password of f1.I now want to scroll down a little bit. I’m going to check the little box that says ‘create database with the same name and grant all privileges’, and that’s going to give it all the privileges to be able to write to the files. Once we’re happy with that we must go down to the right hand side and click the ‘Go’button.  So, we’ve done pretty much what we wanted to do there, we’ve created a database and we’ve created a user.

Now, you know I said keep that folder open just now, what we’ve got to do is go into our WordPress config file again. I’m going to open it with a piece of software called brackets, which is a great free text editor,if you don’t have it you can get it from brackets.io I’ll just do a Google,search for brackets there it is right there. Just click on it and you can download it, it’s absolutely free and it’s a wonderful text editor. So, I’ve opened that with my bracket software, and we can see all the junk that’s in there,most of its not much interest, but if we go down to database name, we’re going to change that to a new one that we’ve just created so it was ‘f1’ database user, was also ‘f1’ database password, you guessed it, it was ‘f1’. Like I said, you needto use a strong password for yours, don’t use a silly one like mine! Database host is localhost’, then all you need to do is go and hit save or hit ‘ctrl s’on your keyboard. Now we’ve actually told it now the database that we want itto use is here!

Now we created that database let’s go back to our localhost,we’ll click on that database ‘f1’. What we want to do is import the file that we downloaded, so we want to rollover to ‘import’, again you may have a newer version of this but it will have an ‘import’ button there, and we’ll hit ‘choose file’,and you just need to browse to the folder that’s got that database file that we downloaded earlier from the online site. As you can see it’s put it there, so when we’re happy just hit ‘go’, that’s it! It says the import has been successfully finished.

Next we actually need to go in here to f1 file, we want to go to our options folder. Once we’ve got that open we want to go over here and if we look at the first two lines, that’s where the old site URL was, we need to change that to our local site URL so let’s hit the ‘edit’. We want to direct it to the local site. I’m going to say HTTP, colon, forward slash, forward slash, and where does it live? It’s localhost! And it’s forward slash the name of the folder which was ‘f1’. I’m going to hit go update it, there it is right there, and we’ll do it to the next one below as well, with the home, and I’ll just paste in what I just copied, hit the ‘go’, that’s it that should be our last step.

Now let’s see if it’s actually worked! So let’s do a new taband we want to go to localhost with the folder which is ‘f1’, hit return, and let’s see what’s going to happen?

There it is, there’s our site. Now it’s locally on our machine and it should be a perfect clone of our online site here. Here’s our online site, I’ll go across, here’s our local site. Let’s make sure it’s going to work, there we go! Works absolutely fine!

So, that is how to manually transfer a WordPress site from an online host to your local host. I hope that’s been useful to you thanks for watching.

Subscribe To Our YouTube Channel

4.5 million views on youtube




Test Out The Divi Theme

IT Certification Category (English)300x250

Elementor Page Builder




Pin It on Pinterest

Share This