How to upload only the iWeb pages you’ve updated
The aim of this article to to save you time whenever you republish your site by only uploading truly changed files to your hosting server. It works with the 'Publish to a Folder...' option under the File menu. You can use this technique for uploading any modified HTML files (covered in this article here). This article does not apply to sites published to .mac.
iWeb Site Structure
It's perhaps helpful at this point to look at the structure of the iWeb Site. You will be able to see this structure if you publish your site to a folder on your computer.
Say you publish your site to a folder called iWeb. In this iWeb folder, will be an index.html file that acts as a redirect to the first page of your site, often your Welcome or Home page, but sometimes your Blog page, or whichever page you've set up immediately below the Site name. Also in this iWeb folder, will be your Site folder, or what you called your site in the Site Organizer.
Within the Site folder will be a further index.html file that again redirects to your first page. You will also see all your pages, page1.html, page2.html, etc (or whatever you called them), along with the corresponding folder for the page containing all the elements required to form that particular page. These folders are called page1_files, page2_files, etc. There will be an Images folder and a SlideShow_assets folder. If you have a blog there will also a Blog folder (or whatever you called your Blog).
Unfortunately, whenever you publish in iWeb, it publishes the whole site in full every time, even if you only made the slightest change to a page. It will also publish all the pages which you’ve not touched! This is a major shortcoming of the program which I hope will be corrected in due course. The drawback with iWeb's way of doing this, is that when you come to upload, because most of the files generated by iWeb will now have a new modification date, your FTP client will upload all these ‘new’ files (even though their content has not changed since you last uploaded). This is a huge waste of time, money and effort.
Modification Dates when Publishing
You'll notice that in the paragraph above, I said most of the files generated by iWeb, and not all of the files. Some files do keep their original modification dates. You will find the files in your Images folder keep their original dates. You will also find media files like movies and animated gifs keep their original dates also. However the picture media files (jpegs and thumbnails jpegs) from photo pages are generated from scratch every time. You can use this knowledge to selectively upload.
How to Set Up for Selective Uploading
You need two folders on your computer. The first one is your publish folder, e.g. called iWeb (where your site goes when you've published). The second one you can call say, iWeb backup where you store a backup your already published site.
Ideally this second folder should be on a different drive or another partition to the first folder. The reason for this is that to copy between the two folders, you can just drag and drop, whereas if you have them on the same drive or partition, you must remember to press the Option (Alt) key whilst dragging and dropping, otherwise if you don't you will move the files, rather than copy the files. This step is not necessary if you are confident in moving the correct files and folders across from one folder to another rather than copying.
HINT: Add iWeb and iWeb backup folders to the left sidebar for ease of access. Either drag them there or select the folders and press Command-T.
Once you have published your site to your iWeb folder (and uploaded it) copy the contents of your iWeb folder to your iWeb backup folder. This is now a pristine copy of your site and what you've uploaded.
You are now set up.
Steps to Follow for Selective Uploading
Work on your pages. Make a note of each page you've updated in iWeb, e.g. page1, Welcome.
Publish to the iWeb folder. Note that all the files with their original modification dates will be overwritten.
Now, go to the iWeb folder, copy the relevant pages you've worked on and their folders to the iWeb backup folder. In this case, you copy the following:
page1_files folder
page1.html
Welcome_files folder
Welcome.html
IMPORTANT NOTE: if you’ve added a new page and included it in the navigation bar or if you’ve changed the name of a page that is already in the navigation bar, you will have to copy all existing page files and their folders to the iWeb backup folder. This is because each page will have been updated to reflect the new link to the new page. So you’re probably better off uploading the whole site in this case.
Click 'Apply to All' then 'Replace'.
HINT: if you've got the iWeb folder and iWeb backup folder on separate partitions and they're also residing in the left sidebar, just drag and drop as appropriate.
ALSO copy your Images folder over from iWeb to iWeb backup. You need to do this because iWeb places images here that it hasn’t generated or modified. You should copy it to be on the safe side in case iWeb has added any images here since you last used it. Since the files within retain their original modification date, you’ve nothing to lose.
Your iWeb backup folder should now be a combination of original (unchanged modification date) files and updated (new modification date) files. Test it by first emptying Safari's cache (Safari > Empty Cache...) then double-clicking on either index.html file in iWeb backup.
If it all functions as expected, with your changes there as you expected, new images where you'd expect and links all working as planned, copy the entire iWeb backup folder contents back into iWeb folder.
Upload your iWeb folder as normal. Your FTP program will now upload only the files with the new modification date, and not the whole site folder.
A Note Regarding Blogs
If you've made a new blog entry, and don't want to upload the whole Blog folder, copy over the following items from your iWeb Blog folder to your iWeb backup Blog folder:
Archive_files folder
Archive.html
Blog_files folder
Blog.html
Images folder
rss.xml
and also your new_blog_entry.html file and new_blog_entry_files folder. You need to find this new entry amongst the folders and files that have exceedingly long, seemingly random names (UUID numbers), like B64A57F2-9EDD-4F22-88EF-58ACF67C759F. Compare the two iWeb Blog and iWeb backup Blog folders side by side to find the new entry. So in this instance, you'd also copy the following new blog entry over from your iWeb Blog folder to your iWeb backup Blog folder:
B64A57F2-9EDD-4F22-88EF-58ACF67C759F_files folder
B64A57F2-9EDD-4F22-88EF-58ACF67C759F.html
Also copy over the main Images folder in case iWeb has added any images there as well. That's it.
With these simple steps, you can save yourself lots of time waiting for uploads to occur by just uploading the changed files.
Since this article was written several other methods of selectively uploading only changed files have come to light, including using unix/terminal based techniques, dedicated software such as Easy iWeb Publisher, w2w, or employing features of certain FTP programs. These may be more suitable for you, however I have not used or checked any of these methods, instead preferring my long hand method which I am happy with - often I publish up to a dozen times a day making changes to the site, so this method has become second nature (and very quick) to me. Cheers.