Wednesday, May 23, 2007

Upload a file to your website using filezilla ftp client

The process of transferring a file from your computer to your website is often referred to as "uploading" that file or "publishing" it. For web hosts that support FTP, or the File Transfer Protocol, you need a program called an "FTP client" to transfer the file. You can find a list of free FTP clients at http://www.thefreecountry.com/webmaster/freeftpclients.shtml

This tutorial only deals with how you can transfer a file to your web server using a free FTP client known as FileZilla. This is a Windows program, so if you use another operating system, you will need to download an FTP client suitable for that platform from http://www.thefreecountry.com/webmaster/freeftpclients.shtml and read the documentation for that program to find out how you can publish a file yourself.
Download and Install FileZilla

First, go to the FileZilla download page and obtain the Setup version of the latest FileZilla client. The latest version is usually listed first on the page. For example, if the latest version is 2.2.15, click the link "Download FileZilla_2_2_15_setup.exe". Choose a location from which to download. Any location will do, but it is usually faster if you choose the link of a country or state that is nearest to you. Save the downloaded program on your desktop.

Once you have downloaded the program, you will have to install it. Go to your desktop and doubleclick the file that you have just downloaded. Follow the instructions to install it to your hard disk.
Preliminary Steps

Before you can upload any file to your site, you will also need some information from your web host. In particular, you will need to find out the following:

* The name of the FTP server for your website. For example, your host may tell you that your FTP hostname is "ftp.example.com".
* Your user id or login username for your FTP account.
* Your password for your FTP account.
* The directory where you need to place your files so that they can be seen by a web browser visiting your site. For example, your host may tell you to place the files in a subdirectory called "www" or "public_html" or even the default directory that you see when you log into your FTP site.

If your web host tells you that you do not have FTP access, you cannot use this tutorial. You will have to use whatever method the web host has designated for you to upload your files.
Steps to Uploading or Publishing a File to Your Web Server

For the purpose of this tutorial, I will assume that you wish to upload a file called "feedback.php". Everytime you see "feedback.php" mentioned, you can substitute that name with the name of the file you actually wish to upload. FileZilla does not restrict you to uploading only files of that name. You can upload images (eg, GIF, JPG, PNG, etc), HTML files, video clips, music files (eg MP3 files, WAV files, MIDI files), Perl scripts, PHP scripts, and so on.

1. Start up FileZilla. The first time you start it, it will ask you whether you want to save your settings in the Registry or an XML file. If you are using FileZilla on your own computer with no other users and you are logged in as Administrator, it probably doesn't matter which option you select. If there are other people using the same computer, you probably should choose to save the settings to the Registry. If you are not sure, or nothing I just said made sense, choose to save your settings to the Registry.

2. Click the "File" menu followed by the "Site Manager" item on that menu. A dialog box will appear.

3. Click the "New Site" button on that dialog box. This creates a new item under "My FTP Sites" called "New FTP site". Rename "New FTP site" to the name of your site if you wish. By default, the keyboard cursor would have been placed in the name portion of "New FTP site" allowing you to change the name immediately. If you have lost the cursor because you accidentally clicked somewhere else in the dialog box, you can get it back by simply clicking once on the name. Note that this name can be anything you wish - it is not required for accessing your site. However, you will probably make your life easier if you change the name to that of your site rather than the cryptic "New FTP site".

4. In the section entitled "Site details", enter the name of your FTP server in the "Host" input box. For example, if your web host told you that your FTP hostname is "ftp.example.com", enter "ftp.example.com" into the space provided.

5. Leave the "Port" and the "Servertype" entry boxes alone. Use your mouse and click on the "Normal" radio button in the "Logontype" section. This will enable the "User" and "Password" boxes for the next step.

6. Enter your user id or your login name (or whatever your web host calls it) into the "User" input box. Likewise, enter your password into the "Password" input box. If you don't want to bother with entering your password everytime you connect, leave the box "Don't save password" unchecked. If you are sharing your computer with others, and don't want others to be able to access your site, you should probably check the "Don't save password" check box.
FileZilla will then prompt you for the password when you try to connect in future.

7. Click the "Connect" button. FileZilla will proceed to log you into your server. If it is successful, you will see a directory listing of your website's account in the right window pane. The left window pane is the directory listing of your own computer.

8. If your web host told you to only upload in a specific subdirectory on the web server, such as in the "www" or "public_html" directory, change to that directory by doubleclicking its name in the right window pane (the "Remote Site" window pane). FileZilla will open that folder and show you its contents.

9. Next, locate the file that you wish to upload in the left window pane (the "Local Site" pane). Both window panes behave like a Windows Explorer windows, so navigating them should not be unduly hard. Once you have located the file you wish to upload, say "feedback.php", doubleclick it to upload it to your website. Alternatively, you can drag that file from the left window pane to the right window pane. The file will be uploaded to the folder that is currently open on the right window pane, so make sure you have changed to the directory you want before dragging the file there.

10. As FileZilla proceeds to upload your file to your site, you should be able to see the upload progress in the bottommost window pane in FileZilla. When the upload has completed, you can disconnect from your website. Do this by clicking the "File" menu followed by the "Disconnect" item.

Congratulations! You have successfully uploaded a file to your website using an FTP client, FileZilla.

No comments: