How to deploy a website to a web server.

Dave O'Dea
Kitchen to Keyboard
4 min readApr 22, 2017

This is part 5 in “How to set up your own cloud based web server

  1. Create a server.

2. Setup the server.

3. Install the LAMP stack.

4 .Setup a domain name (i.e. www.myDomain.com).

5. Getting files on the server ← You are here !

Wow, we are on the home stretch now. At this point we have the knowledge to be able to create a server , setup the server, install the LAMP stack and setup a domain name .

The last piece of the puzzle is how we do we actually get them onto our web server. We could use an SFTP utility on our command line, but there is a an easier, more beginner-friendly method.

We are going to use FileZilla which is a tool that basically uses the SFTProtocol to securely send files from your local machine over the internet and up into your server.

  1. Download and install FileZilla:

It can be downloaded from here. You should download the client package:

Once installed, open FileZilla and follow the following steps to connect your server:

2. Connect to your server:

  • File > Site manager (CMD + S) .
  • Click new site from the options on the bottom left .
  • Fill out all sections in the General tab with the authentication details for your server:

NOTE: Ensure you select SFTP for Protocol .

  • Click connect and you will see your site load in the right pane of FileZilla. The left pane shows your working, local directory on your local machine.
  • In the Remote site text-area, you will want to navigate to
/var/www
  • Here you will find the HTML directory/folder

3. Upload website files:

  • Now at this point it is time to get those beautiful files full of code up onto your web server.
  • If you don’t have a working website built, you can go here:

… to my GitHub page where I have left a sample website for you to use.

  • If you know what to do with Git and GitHub, then pull down the repository into a directory on your local machine.
  • Most likely you wont have much Git experience, that’s cool too, just go ahead and from the link above, find the green button saying ‘ Clone / Download ’ and select ‘ Download ZIP ’.
  • Unzip the downloaded folder.
  • Then, inside FileZilla once again, in the left pane, navigate into that folder as below:
  • You should see your local files on the left, remote server on the right .
  • Now simply highlight the files/folders on the left and drag them over (or right-click and select upload) to the right side. It will take a moment or two, depending on the size of the upload.

Once the upload is complete, thats it, you’ve done it! You now have a fully functioning website uploaded to your own web server hosted in the cloud.
Awesome job !

If you browse to www.yourdomain.com you will see this (or whicever site you uploaded):

Credit.

So, to recap, these are the steps we went through in this series “How to set up your own cloud based web server”:

  1. Create a server.

2. Setup the server.

3. Install the LAMP stack.

4 .Setup a domain name (i.e. www.myDomain.com).

5. Getting files on the server ← You are here !

I really hope you enjoyed this series and I look forward to future posts about topics that I mentioned throughout such as secure key authentication, further enhancements and server monitoring.

If you have any questions or additions to make, please let me know in the comments below or get in touch on Twitter.

~ Dave.

--

--