Class Reading, Learn Tech Skills

FTP & SFTP

FTP & SFTP are two common ways to put your website files on a web server so that they can be accessed via the internet.

FTP & SFTP are two common ways to put your website files on a web server so that they can be accessed via the internet.

FTP stands for File Transfer Protocol and SFTP stands for Secure File Transfer Protocol. The only difference is that the secure one encrypts your files, username and password for greater security. If possible, we recommend that you use SFTP.

You can use FTP & SFTP for lots of different reasons—to share big folders of images with work colleagues or video files with a client. FTP is super useful because you can use it to share files that are many gigabytes in size.

But the way we want you to use FTP is to put your website files onto your web server.

Let’s say you bought www.mywebsite.com and you want to create a little PHP app that greets every visitor with the message:

“Hello! Welcome to my awesome website of awesomeness!”

After you buy the URL and a web hosting package, you need to obtain your FTP information. What you are looking for is:

  1. Whether you should use FTP or SFTP
  2. A URL for your web server (it often looks like ftp.yourwebsite.com OR ftp.hostgator.com)
  3. Your username, often something generated like yourwebsite240532
  4. Your FTP password

Then, what you do is download a free FTP application such as Fetch, FileZilla or Fugu, fill in the appropriate information in the appropriate spots, save the following code snippet into a file called index.php:

<?php echo "Hello! Welcome to my awesome website of awesomeness!" ?>

And drag and drop that file into the root folder of your FTP web server.

We’re in business baby! Your awesome website of awesomeness can now found by anyone at www.yourwebsite.com.

Skillcrush