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

Hi guys welcome to another WordPress
migration video this is Jamie from and Well in our last video we migrated a site using a plug-in called deva katta
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 gonna 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 gonna 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 gonna do is we’re gonna
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 gonna need
a plug-in or a piece of an app called xampp and if you just google xampp XA
MPP it’ll bring up this page and you can go to the Apache Friends door and
download it’s very lightweight it won’t take up much space on your computer and
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 gonna want to run this and it’s gonna 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 the
interface when yours may look slightly different so once you’ve run it this is what’s
gonna come up you want to make sure that your Apache and MySQL are started and if
that 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 maybe 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
if you’re using a different one like I page they’re slightly different but they
all have the same features as the file manager and we’re going to be using the
file manager and the MySQL database is the two features we’re gonna use we’ll
do it with this one today so there’s a file manager and there’s MySQL but
probably gonna be using the PHP myadmin but first thing we want to do is the
file manager for the site let’s click on it and it takes us to the the farm as
you now everything is usually in the public HTML right here I hear of us all the files for the
website that we want to back up 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 pet compress you and what it’s done
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 and you want to keep that safe somewhere we’re gonna need it in a
minute now I know cuz I’ve done it before I page doesn’t let you compress file see
you probably gonna have to do this yr an FTP client tongue like FileZilla here
which again is another free one and if you just google FileZilla there it is right there and you can
download it and again it’s very lightweight and they’ve got one for all
platforms they got the windows one there and it’s a what they call an FTP client
which means file transport protocol which which enables you to transport
files from one place to another and basically when you open it when you hook
up to your just go to your FTP crate create a user
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 and all you do is select
them and drag them across so that’s that 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 gonna
want to download the database and just to show you who is our file manager if
you’re not sure what the database is called let’s go down to a wordpress WP
config file right here you see WP config I’m gonna edit it and there’s a warning
obviously we’re not actually gonna 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 so it’s just in 22 fashion if you’re not sure what the database
name was so I’m gonna just close that out that’s how to find the name of your
database if you’re not sure what it was and quite often you might be dealing
with a client that has multiple sites on there so there’s gonna be multiple
databases so we’re back to the cPanel now let’s go down a PHP myadmin and once in there gives you a list of a
few the databases that are here and the name of the one that we wanted was a
fashion right there I’m just clicking on it well it’s done it’s brought out that
database and what we need to do is come up here and hit the export button quick display only the minimal options
that’s absolutely fine we want it to be SQL there are other options there but
use SQL for this and when you ready hit the Go button you and again it’s done the download force
here and I obviously hit that button again is
downloaded again so we want to browse to where these files are and keep them safe
so I’m going to browse those put them in a little folder because
we’re gonna want to use those in a moment okay so that’s the backup online
backup taking care of there that’s what we need to do there so like I said
earlier once you’ve got xampp installed downloaded and installed on your
computer if you go to your main computer 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 gonna see xampp a folder called xampp installed there on a double
click on there and inside locate the folder called htdocs that inside that is
where we put all of our websites that we’ve built lately as you can see I’ve
got a whole bunch here you’ve probably only gonna have a few folders there with
things like restricted and PHP and stuff like that 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
cuz I’ve actually already got that site out here is fashioned when we did it the
other way yesterday okay so it’s in the folder called f1 I’m gonna open that
folder I’m going to copy over those the zip file that we downloaded from our
live site I’m actually gonna rename this because
when it unzips I’ve got a folder inside that called WordPress admin and it’s
gonna put this in a folder called WordPress admin and that might cause a
problem so I’m just gonna right click hit rename you call it a pin – really
doesn’t matter what you put on the end as long as it’s changed it from that
initial so I’m going to right click hit extract here and there we are it’s extracted at all
here and what I’m gonna do is I can delete that zip file we no longer need
that so I’m going to hit shift delete I can get rid of that far so basically
we’ve got all of our website files right here now then our next step will keep this
folder open is we want to go to our xampp software that we’ve installed here
and to do that we want to go to localhost just type in localhost loc al
h KO st and that will bring us up said earlier I’ve got enough an earlier
version of this and it works fine you may have a newer version with your menu
at the top but what we’re going to be using is the PHP myadmin
and yours will have that somewhere so just look for it now let’s click on that
and what I’m gonna do you can create a new database if you want to then you’ll
have to create a user but I’m gonna go ahead two users click on users scroll
down and I’m gonna say add user and I’m gonna 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 gonna
be the localhost I’m gonna 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 gonna 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 F 1 and F 1 there also I
want to scroll down a little bit I’ll I’m gonna check the little box that says
create database with the same name and grant all privileges and that’s gonna
give it all the privileges to be able to write for the files once we’re happy
with that we must go down to the right hand side and click the Go button right we’ve added a new user don’t need
to say that again like we said yesterday this LastPass is what I use for managing
my passwords and I’m hundreds and hundreds of them and if your memory is a
bit shoddy like mine it’s a great little free app LastPass that is okay so we’ve
done pretty much what we wanted to do there we’ve created a database and we’ve
created a user now I you know I said keep that folder open just now we’ve got
to do is go into our WordPress config file again I’m gonna 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 dot IO I’ll just do a Google search for
brackets there it is right there a brackets dot IO 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 just to demonstrate once again I’m
sorry to keep flashing screens up at you once you’ve got brackets installed it’ll
show these icons for these files here and as long as you check the option they
will always be an open with brackets appendage here when you right-click on a
file so that’s all I’ve done to open it in the brackets there all right so if we
open this we can see all the junk that’s in there most of its not much interest
but if we go down a database name 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 say do you use a strong password for yours don’t
use a silly one like mine database host is localhost which that can stay in the
same character step and collate you don’t need to change at all and 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 it to use here so 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 it’s like there it is right there
as you can see it’s put it there so when we’re happy
just hit the gobo that’s it it says the import has been
successfully finished so we actually need to go in here who
rf1 file we want to go to our options folder okay 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 was
the online site we need to change that to our local site URL so let’s hit the
edit we want to direct it to the local house I’m gonna 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 here’s that folder and it was called f1
and we’re dealing with local hosts so it’s HDTV local host /f one so I’m gonna
copy that I’m gonna 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 or 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 tab and we want
to go to localhost LOC 8l h o st /name 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 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

Leave a Reply

Your email address will not be published. Required fields are marked *