‫Welcome back, my dear students.
‫So now in this lecture of the course, we're going to be transferring our locally hosted Sram based
‫website from our computer to the online server.
‫So if you are basically using the sham, then this particular lecture is for you.
‫If you are using the local WP instead, then I would recommend you to watch the other lecture.
‫So let's just go ahead and let's get started.
‫So to transfer the website from Sham to the online server, you basically need two things.
‫So number one is basically the WordPress files and the other one is actually the database.
‫And in this lecture of the course, we're going to be understanding how we can achieve that.
‫So first of all, what we have to do is to actually go to the hostinger.com.
‫Once you are in here now you have to click on log in and it is going to log you in.
‫If you are not logged in, you can click on login with Google or you can enter your email address and
‫password to log in to the hostinger.
‫All right.
‫So once you are basically logged in, now you have to go into the websites and after that you have to
‫go to the manage.
‫Once you are in the manage, now you have to go into the files and then you have to click on file manager,
‫which is going to basically take us to the docs.
‫All right.
‫So if I go ahead and if I show you the sham HD docs.
‫You can see that when we installed Champ, I actually told you to to add the WordPress files in the
‫docs.
‫This docs is actually going to be exactly similar as the file manager.
‫So let's just click on the file manager and then you have to click on access files of your domain name.com
‫If you want to access this as well, it's okay.
‫But if you access from here, make sure to not delete anything.
‫So that is why it is actually safe to access files directly from whatever the domain name that you have.
‫Dot com.
‫All right.
‫You can click on it and it is going to open up the file manager.
‫All right.
‫So once you are actually in the file manager, you can see it says public underscore HTML.
‫If you click on it now, you can see that this is where the root folder is.
‫That means that when we type in our domain name, dot com, whatever the file that is going to be in
‫here named as the default dot PHP or index dot PHP is going to be loaded up.
‫So let's suppose that now if I delete this default dot php that I have and I just click on delete and
‫I just click on delete, now you can see that this folder is actually empty.
‫And now if we go ahead and we refresh this page.
‫You can now see that it says this website cannot be reached.
‫Check if there is a typo.
‫All right.
‫So if you are getting this error, it is totally fine.
‫So after 2 to 3 minutes of that error, when I basically refresh the website again, this was basically
‫being shown to me.
‫But if you are still getting that error, it's okay.
‫There is no need to worry.
‫You still have to give it some time.
‫All right.
‫So let's suppose that if you are getting this error or you are getting that black screen error, that
‫that typo error, it's totally okay.
‫What I need you to do is to go into the public HTML page and then you have to click on new file.
‫All right.
‫Now we're going to be testing if basically our public underscore HTML is working totally fine.
‫All right.
‫And then you have to write the name of the new file.
‫So I need you to write the name of your new file to be index dot p HP.
‫All right.
‫Just write it as it is.
‫Then you have to click on Create and it is going to create that file and open up that in a text editor.
‫All right.
‫Now, in here, what you have to do is to write some of the program that I'm telling you right now.
‫All right.
‫So you have to write here less than sign question mark.
‫Then you have to write here p hp.
‫All right.
‫Just write it as it is.
‫Otherwise it's not going to work.
‫All right.
‫And after that, you have to hit on enter.
‫Please note that we are not actually transferring the website right now.
‫This is just for the testing purposes.
‫If you want to do it, it's okay if you do not want to do it and you want to transfer the website,
‫then you can just watch what I'm doing and you do not have to implement it because we're going to be
‫eventually deleting this file what we are creating right now.
‫All right.
‫And once you have actually hit on enter after that, then you have to write here Echo.
‫All right.
‫Echo That is basically used for printing something in the PHP language.
‫Then you have to write here two double quotation marks.
‫All right.
‫And now in between these double quotation marks, you have to write here, Hello world or whatever you
‫want to write.
‫So after this single quotation or double quotation mark, you can go ahead and you can add a semicolon
‫at the end.
‫That's it.
‫This is the thing that you need to do.
‫Now, if you want to close this PHP tag, it's okay, but it is not necessary.
‫So let's suppose that I want to close it.
‫So I'll write here.
‫I'll first of all hit on enter so that I'm taken to a new line and then I'll write here a question mark
‫and then greater than sign, that's it.
‫And now once you are basically done with that, then you have to click on this floppy icon at the top
‫right click on that and it's going to be saved.
‫Once it is actually saved.
‫Now you have to refresh your page.
‫So once you will refresh, you will see that the Hello world will be written here.
‫If it is not written here and you are still getting that error, I would recommend you to give it at
‫least 5 to 10 minutes for the cache and the cookies issue and it can be resolved.
‫And if it's still not resolved and you are not able to see this, then I would recommend you to reach
‫out to the customer support by clicking on here.
‫And then you can tell them that I actually created an index dot php file in my file manager and it's
‫still not working, so it should work.
‫All right.
‫So if it is working, then you are ready to go to the next step.
‫And the next step is to basically add the WordPress files instead of this index dot PHP.
‫So what we will do is that we will click on cross and we will get rid of this index dot php that we
‫have created.
‫Make sure to delete this file.
‫All right, so you have to right click on it and then you have to click on delete and then you have
‫to click on delete.
‫That's it.
‫Once this file is actually gone, now you have to transfer the sham based WordPress files to this public
‫underscore HTML.
‫So let's just go ahead and let's open up the docs of the sham.
‫If you are basically using the windows, then I would recommend you to click on the my computer and
‫then you can click on the local disk.
‫Then you can click on the champ and then you can click on the docs.
‫And then inside the docs you will be given the WordPress files.
‫So what I need you to do is to just select all the files that you have in there.
‫You can press select a file, then you can press Ctrl A or command A to select all the files.
‫Once every single file is selected, then you have to compress these files.
‫This is really very important in Mac you can right click and then you can click on compress and all
‫the files will be compressed.
‫If you are basically using windows, then you can use a software that is called Winrar.
‫This is basically a software that you can use on Windows to compress a file, compress all the files
‫into the zip file and you can go and you can search on YouTube how to compress a folder, how to compress
‫files, and you can then compress all the files into the zip file.
‫So once you have basically gotten the zip file, now you can see that the zip file is right here named
‫as the archive dot zip.
‫Then you have to basically transfer this zip file into the online server, which is the file manager.
‫So how you are going to do that, you have to just click on here that says upload.
‫All right, You have to click on here and this is going to open up a pop up.
‫It says Select an option to upload file or folder.
‫I want to upload the file.
‫All right.
‫And once I have opened that up, then I have to go into the applications, go down to the Champ HD Docs,
‫and then you can see that I've got this archive dot zip.
‫So if you are using the windows you can go to the C drive Champ HD Docs and then your zip file will
‫be there.
‫All right, so I'll just click on Open and this is now being uploaded onto the online server.
‫So if I just open that up, you can see that now this is being uploaded and there is also a blue line
‫representing that.
‫So let's wait till this is actually uploaded and then I'll be back.
‫All right.
‫So now you can see that we have got our archive.
‫Zip over here.
‫Now, what you have to do is to right click on it.
‫And then you have to click on extract over here so that it actually extract the file.
‫Now here it says Choose the folder name where you want to extract it, select the destination.
‫So it is going to be actually extracted over here.
‫Now what I'll do is that I will just like, don't do anything in here.
‫I'll just click on extract.
‫All right.
‫But it is telling me to choose a folder name, so let's suppose that I want to write here.
‫WP All right.
‫And now I will click on Extract, and now a folder will be created named as a WP.
‫And inside there this zip file is going to be extracted.
‫So if I open this up now, you can see that I have got all the files in here.
‫But now if you are using the Mac operating system, you should see this underscore Mac OS X, you can
‫right click on it and you can delete it.
‫But if you are using the windows, it is not going to be shown to you.
‫This is actually an extra step for the Mac users.
‫All right.
‫So now what we basically need to do is to transfer or remove all the files from this WP folder to the
‫public, underscore HTML.
‫And before doing that, we also need to get rid of this archive dot zip because we do not need it,
‫so we will just hit on delete.
‫All right.
‫And now we have to move the inside folders and files to the outside of this WP folder.
‫So let's select everything.
‫First of all, you can select a one single folder or file.
‫And after that you can press command A or control A to select all the files from here.
‫And once you have selected every single file from here, then what you have to do is to bring your mouse
‫to this icon that says move file.
‫You have to click on it and it is going to ask you where would you like to move it?
‫And right here at the top, you can see that we have got this two dots.
‫If you basically double click on it, then you can see that it takes you to the previous folder because
‫now here in the public underscore HTML, we have to move the files so you can click on move.
‫And now the files will be moved from WP folder to the public underscore HTML folder.
‫Now you can right click on the WP folder and then you can delete it.
‫And now this is basically the root folder where now WordPress files are actually in.
‫And now if you go ahead and you refresh your domain name, now you will see the database error.
‫So if you are getting this error, then congratulations.
‫You have successfully completed the first part, which is transferring the WordPress files.
‫Now we only have to transfer the database.
‫And this is something that we will be doing in the next lecture.