Publishing Files to a Web Server with FTP
You can upload pages to your server and download pages from your server using the built-in FTP capabilities of Dreamweaver.
To transfer files between your hard drive and a remote server (after you’ve successfully set up the FTP features we cover in the preceding section of this chapter), follow these steps:
1Make sure the site you want to work on is selected in the Files panel in Dreamweaver.
You can begin publishing now.
2In the upper left corner of the Files panel, click the Connects to Remote Host button (which looks like a blue electrical cable plugging into itself).
If you’re not already connected to the Internet, the Connects to Remote Host button starts your Internet connection. If you have trouble connecting this way, establish your Internet connection as you usually do to check e-mail or surf the web, and then return to Dreamweaver and click the Connects to Remote Host button after you’re connected.
When your computer is online, Dreamweaver should have no trouble automatically establishing an FTP connection with your host server.
3After you establish a connection between your computer and your web server, click the Expand/Collapse button (which looks like stacked horizontal lines at the far right end of the top of the Files panel).
When you click this button, Dreamweaver displays both the local folder with your site on your hard drive and the remote folder with the site on your server. We prefer this dual view because seeing both folders side by side makes moving files from one place to another easier. This dual view also helps you visualize the structure of the site on the server.
The row of buttons across the top control FTP functions, making it easy to connect to your web server and upload or download files. You can also view your local site folder by choosing Local View from the drop-down list in the upper right corner. Or, choose Remote View to see only the files on the server.
4To upload a file (transfer it from your hard drive to your web server), select it from the Local View panel, which displays the files on your hard drive, and click the Put Files button (the up arrow) in the Files panel.
The files are copied automatically to your server when you transfer them. You can select multiple files or folders to be transferred simultaneously.
Always test your pages after you upload files to your server, by viewing the new files in a web browser. For more complete testing recommendations and resources, refer to the earlier sections in this chapter on testing the page display and validating code.
5To download (or transfer from your web server to your hard drive) files or folders, select the files or folders from the Remote View panel (which displays the files on your server) and then click the Get Files button (the down arrow) in the Files panel.
The files are copied automatically to your hard drive when you transfer them.
When you copy files to or from your server, the files you transfer overwrite the files already at the destination. Dreamweaver notifies you about the overwriting if it notices that you’re replacing a newer file with an older one, but it can’t always correctly assess the proper time differences.
Take note of these warnings, but keep in mind that warnings aren’t always accurate when they’re based on file age, especially if you use more than one computer to work on your website.
6To close this dual panel dialog box and return to the main Dreamweaver workspace, simply click the Expand/Collapse button again.
When the transfer is complete, you can open the files on your hard drive.