Understanding FTP

In this article, you'll get an overview of FTP (File Transfer Protocol) which is a method of connecting and uploading or downloading files between a remote server (the server that is hosting your live site) and your local desktop computer. FTP is a powerful tool for uploading a large quantity of files to your site quickly. You can also use it to download your entire site, to create a backup copy of the files. This is particularly handy when doing a major redesign of the site, so that you can preserve the existing data before launching the new version.  

Understanding how FTP works

The Internet (which is a TCP/IP-based network) has many protocols (which are essentially a formal set of rules and digital message formats) that enable communication across the network and other machines, including desktops, laptops and servers. The File Transfer Protocol was designed and is used to copy a file from one location to another, such as uploading a file from a local machine connected to the Internet to another machine, such as a website's host server. 

Before you can connect to the other machine on the network, you must have the proper credentials (login information) and permissions (privileges) which allow you to make the connection. Obviously, the Internet would be chaotic if every user with an Internet connection could upload and update files to any site they wanted… so there is FTP, a method which uses a client-server architecture to control the connections and only allow those users with the correct password and permissions to authenticate and connect to sites.

In this system, you may have multiple sites hosted on the same platform. For this reason, you'll use your site's URL, such as my_domain_name.com or my_trial.worldsecuresystems.com for the host, and then you'll enter the same information, plus a forward slash (/) and then the same email address that you use when you log into the Admin Console as your user name. 

That way, you can use the same email address you use for all of the sites, and the site URL will specify which site (of the multiple sites you may have) as the one where the uploaded files will live.

And for simplicity, you'll use the same password that you use when you log into the Admin Console to connect to the site via FTP. Once you've set up your login information in an FTP client (a graphic interface that enables you to connect and then see both your remote site files on the host server and the local files on your machine), you don't have to re-enter them. You can use a single FTP client to set up multiple connections (in a case where you have multiple sites) and then launch the software and click Connect whenever you have new files that you want to upload to the server.

Examples of FTP clients

Many FTP clients are available. You can download free FTP clients (as well as those that require a fee) from the Internet. Unless your have a specific reason to purchase one, the free FTP clients will usually work fine. The main thing to remember when choosing an FTP client is to check the platform, and download one that matches the operating system that you are running. Also check the system requirements, because some support only one flavor of Windows (such as Windows XP) and cannot be used with other versions (such as Windows Vista). 

The following list is by no means inclusive, but it is a good starting point when investigating which FTP client to use:

Find other FTP clients by searching on the following terms using your favorite search engine: Download free FTP client, along with the name of your operating system. To get details about uploading files with a third-party FTP client, read Connecting to your site using an FTP client

In addition to FTP clients that you download online, many other web design software programs have built-in FTP functionality. For example, Dreamweaver has a Quick Site Setup wizard that makes it easy to log in and connect to your site, and you can use the Files panel to upload (put) and download (get) files. Other HTML editors also have FTP capability, so be sure to check if you are already using web design software (besides the Admin Console) to design your site.

If you are using Dreamweaver to upload and download site files, read Connecting to your site using Dreamweaver for more information. 

In addition to these options, the Admin Console has an FTP feature as well. It is called the File Manager, and it is located in the top right corner of the navigation bar. 

Using any browser with an Internet connection, you can log into your site's Admin Console and use the File Manager to upload the files that you want to add to your live site. To learn more about working with the File Manager, see Using the File Manager to upload files.

Transferring files in both directions

It's important to understand that transferring files can occur in two ways when using FTP:

  • You can upload files from your local computer to the host server
  • You can also download files from your host server to your local computer

Downloading files is helpful to create a backup of your entire site locally, so that you can keep it handy in case you want to quickly revert it. If you are redesigning your site, you'll have peace of mind knowing that your files are all saved locally, so that you could re-upload them if needed, to restore the site's original pages. 

The workflow for editing pages outside of the Admin Console is similar. You'll download a file to your local machine first, so that you have the most recent version from the live site. Then, you can use an HTML editor (like Dreamweaver) or any text editor, to make changes to the HTML page on your computer. When you are finished, you'll upload the file of the same name (with the recent changes) to your remote server again.

Updating your live site by overwriting files with the same file name in the same folder

The files you upload to folders on a different machine work the same way as when you move or copy files within your own desktop or laptop. For example, imagine that you've created a folder named music that contains many MP3 audio files, and one of the files is named strawberry_fields.mp3. If you later get another copy of the song and attempt to copy another file named strawberry_fields.mp3 into the same music folder where the other one exists, a dialog box appears asking: 

An item named strawberry_fields.mp3 already exists in this location. Do you want to replace it with the one you are moving? 

If you click Stop, the copy operation is aborted and the new MP3 file you were moving is not copied to the music folder.

If you click Yes, the new file is copied into the folder, overwriting the file that was already there. The computer doesn't really look at the file's contents, only the file's name. So if you just copied a live recording of the song Strawberry Fields Forever into the music folder, you effectively deleted (updated) the version recorded for the album that was there previously. 

This same behavior exists when you copy the files across the network. If you upload a newer version of index.html to the root level of your site where an older version of index.html already exists, the FTP client doesn't warn you, it simply overwrites the file. Then, when you view the home page of your site in a browser, it displays the newer version with your recent changes.

Clearing your browser's cache to see the new site files

Browsers use a feature called caching to optimize the experience of viewing websites online. When you visit a site for the first time, the site takes longer to display because the page itself (as well as all of the linked image files, style sheets, etc.) must be downloaded over the Internet to your local machine. However, in subsequent visits you'll notice a marked improvement in performance, because the files are already downloaded to your local machine.

Caching is a desireable behavior, and in general is helpful for surfing the Internet. However, it can lead to confusion for web designers. There are times when you've uploaded a new file (overwriting the original file on the remote server) and yet, although you are sure the file was uploaded successfully, the page is still displaying the older version in the browser. This is an example where the browser is doing its job of optimization (showing the cached version) when you want the entire page to download the fresh content and show you the new version.

If you experience this, there are two things you can do:

  1. Refresh the page repeatedly to see if the browser will attempt to download the newest version of the files.
  2. Access the browser's tools, options or preferences (the interface varies between browsers) and choose the setting to clear the cache. When you choose this option, the browser discards the cached version of the pages it has stored, and when you visit your site again, it will download the files from the host server and display the newer version of the page. 

The steps for clearing cache vary by browser type . For example, in the Firefox browser, you choose Tools > Clear Recent History. In the dialog box that appears, check the checkbox next to Cache and click Clear Now.

In Safari, choose Safari > Empty Cache, as shown below: 

Check the online help documentation for the browser you are using, if you are unsure how to clear the cache.

To learn more about uploading and downloading files with FTP, read the following articles:

Connecting to your site using an FTP client

Uploading files with the File Manager and Dreamweaver

Troubleshooting FTP connectivity issues