Finding and Using Free and Easy FTP Programs

FTP programs are referred to as FTP clients or FTP client software. Whatever you decide to call it, an FTP client is software that you use to connect to your Web server to view, open, edit, and transfer files to and from your Web server.

Using FTP to transfer files requires an FTP client. Many FTP clients are available for download. Here are some good (and free) ones:

In Book II, Chapter 1, you discover how to obtain a hosting account, and in the previous section of this chapter, you discover how to create an FTP account on your Web server. By following the steps in the previous section, you also have the FTP username, password, server, and port information you need to connect your FTP client to your Web server so you can begin transferring files.

Connecting to the Web Server via FTP

For the purposes of this chapter, we use the FileZilla FTP client (http://sourceforge.net/projects/filezilla) because it's very easy to use, and the cost is free ninety-nine (that's open source geek-speak for free!).

Figure 2-2 shows a FileZilla client that's not connected to a server. By default, the left side of the window displays a directory of files and folders on the local computer.

The right side of the window displays content when the FileZilla client is connected to a Web server, specifically, directories of the Web server's folders and files.

image If you use a different FTP client software than FileZilla, the steps and look of the software will differ, and you will need to adapt your steps and practice for the specific FTP client software you are using.

Connecting to a Web server is an easy process. Remember the FTP settings you saved from Step 7 in the previous section? As a reminder, here are the FTP settings from the previous example:

FTP Username: [email protected]

Password: yourpassword

FTP Server: ftp.yourdomain.com

FTP Server Port: 21

Quota: Unlimited MB

Figure 2-2: Mozilla FileZilla FTP client software.

image

This is where you need that information. To connect to your Web server via the FileZilla FTP client, follow these few steps:

  1. Open the FTP client software on your local computer.

    Locate the program on your computer and click (or double-click) the program icon to launch the program.

  2. Choose FileimageSite Manager to open the Site Manager utility.

    The Site Manger utility appears, as shown in Figure 2-3.

  3. Click the New Site button.

    You can give the new site a name, so type a name that helps you identify the site. This site name can be anything you want it to be because it isn't part of the connection data you add in the next steps. (In Figure 2-4, you see My Site — original, we know.)

    Figure 2-3: The Site Manager utility in the FileZilla FTP client software.

    image

  4. Enter the FTP server in the Host field.

    Host is the same as the FTP server information provided to you when you set up the FTP account on your Web server. In the example, the FTP server is ftp.yourdomain.com, so that's entered in the Host field, as shown in Figure 2-4.

  5. Enter the FTP port in the Port field.

    In the previous example, the FTP port is 21. Typically, in most hosting environments, FTP uses port 21 and this never changes. However, double-check your port number and enter it in the Port field, as shown in Figure 2-4.

  6. Select the server type.

    FileZilla asks you to select a server type (as do most FTP clients). Select FTP - File Transfer Protocol from the Server Type drop-down menu, as shown in Figure 2-4.

  7. Select the logon type.

    FileZilla gives you several different logon types to choose from (as do most FTP clients). Select Normal from the Logon Type drop-down menu.

  8. Enter your username in the Username field.

    This is the username given to you in the FTP settings. In the example, the username is [email protected]

  9. Type your password in the Password field.

    This is the password given to you in the FTP settings. In the example, the password is {W?$s((7Tqi.

    Figure 2-4: FileZilla Site Manager utility with FTP account information filled in.

    image

  10. Click the Connect button.

    This connects your computer to your Web server. The directory of folders and files from your local computer display on the left side of the FileZilla FTP client window, and the directory of folders and files on your Web server display on the right side, as shown in Figure 2-5.

Now you can take advantage of all the tools and features FTP has to offer you!

Figure 2-5: FileZilla displays local files on the left and server files on the right.

image

Transferring files from point A to point B

Now that your local computer is connected to your Web server, transferring files between the two couldn't be easier. Within the FTP client software, you can browse the directories and folders on your local computer on the left side and browse the directories and folders on your Web server on the right side.

FTP clients make it easy to transfer files from your computer to your hosting account by using a drag-and-drop method. Two methods of transferring files are

  • Uploading: Generally, transferring files from your local computer to your Web server. To upload a file from your computer to your Web server, click the file you want to transfer from your local computer and drag and drop it onto the right side (the Web server side).
  • Downloading: Transferring files from your Web server to your local computer. To download a file from your Web server to your local computer, click the file you want to transfer from your Web server and drag and drop it onto to the left side (the local computer side).

image Downloading files from your Web server is a very efficient, easy, and smart way of backing up files to your local computer. It's always a good idea to keep your files safe, especially things like theme files and plugins, which we cover in Books VI and VII.

Editing files by using FTP

You will run into situations where you need to edit certain files that live on your Web server. You can use the methods described in the preceding section to download a file, open it, edit it, save it, and then upload it back to your Web server. That is one way to do it. Another way is to use the built-in edit feature that exists in most FTP client software, by following these steps:

  1. Connect the FTP client to your Web server.
  2. Locate the file you want to edit.
  3. Open the file by using the internal FTP editor.

    Right-click the file with your mouse and choose View/Edit. (Remember I'm using FileZilla; your FTP client may name it differently, such as Open or Edit.) Usually, the FTP client will use a program that already exists on your computer — such as Notepad for a PC or TextMate for Mac — to edit the files. In some rare cases, your FTP client software may have its own internal text editor. FileZilla uses a program designated for text editing that already exists on your computer.

  4. Edit the file to your liking.
  5. Save the changes you made to the file.

    Click the Save icon or choose FileimageSave.

  6. Upload the file to your Web server.

    After you save the file, FileZilla alerts you that the file has changed and asks whether you want to upload the file to the server. Click the Yes button; the newly edited file will replace the old one.

That's all there is to it. Use the FTP edit feature to edit, save, and upload files as you need to.

image When you edit files by using the FTP edit feature, you are editing files in a “live” environment; meaning that when you save the changes and upload the file, the changes take effect immediately and affect your live Web site. For this reason, we strongly recommend downloading a copy of the original file to your local computer before making changes. That way, if you happen to make a typo on the saved file and your Web site goes haywire, you have a copy of the original to upload to restore it to its original state.

Changing file permissions

Every file and folder on your Web server has a set of assigned attributions, called permissions, that tells the Web server three things about the folder or file. On a very simplistic level, these permissions include:

  • Read: This setting determines whether the file/folder is readable by the Web server.
  • Write: This setting determines whether the file/folder is writable by the Web server.
  • Execute: This setting determines whether the file/folder is executable by the Web server.

Each set of permissions has a numeric code assigned to it, identifying what type of permissions are assigned to that file or folder. There are a lot of them, so here are the most common ones that you run into when running a WordPress Web site:

  • 644: Files with permissions set to 644 are readable by everyone and writable only by the file/folder owner.
  • 755: Files with permissions set to 755 are readable and executable by everyone, but only writable by the file/folder owner.
  • 777: Files with permissions set to 777 are readable, writable, and executable by everyone. For security reasons, you should not use this set of permissions on your Web server unless absolutely necessary.

Typically, folders and files within your Web server are assigned permissions of either 644 or 755. Usually, you'll see PHP files, or files that end with the .php extension, with permissions set to 644 if the Web server is configured to use PHP Safe Mode.

image This is a very basic look at file permissions because, usually, you will not need to mess with file permissions on your Web server. In case you do need to dig further, you can find a great reference on file permissions from Elated.com at http://www.elated.com/articles/understanding-permissions.

You may run across a situation where you're asked to edit and change the file permissions on a particular file on your Web server. With WordPress sites, this usually happens when dealing with plugins or theme files that require files or folders to be writable by the Web server. This practice is referred to as CHMOD, an acronym for Change Mode. When someone says, “You need to CHMOD that file to 755,” you'll know what they are talking about.

Here are some quick and easy steps for using your FTP program to CHMOD a file, or edit its permissions on your Web server:

  1. Connect the FTP client to your Web server.
  2. Locate the file you want to CHMOD.
  3. Open the file attributes for the file.

    Right-click the file on your Web server and choose File Permissions. (Your FTP client, if not FileZilla, may use different terminology.)

  4. The Change File Attributes window appears, as shown in Figure 2-6.
  5. Type the correct file permissions number in the Numeric Value field.

    This is the number assigned to the permissions you want to give the file. Most often, the plugin or theme developer provides you which permissions number to assign to the file or folder; typically, it will be either 644 or 755. (The permissions in Figure 2-6 are assigned the value of 755.)

  6. Click OK to save the file.

    Figure 2-6: The Change File Attributes window in FileZilla.

    image

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset