Losing your site definitions in Dreamweaver can be a disaster, but it does happen sometimes. The best way to prepare for such an eventuality is to back up your site definitions on a regular basis.
You can back up all your site definitions in a single operation by selecting Site > Manage Sites. In the dialog box that opens, Shift-click to select all site names, and then click Export.
In Dreamweaver CS6, the Manage Sites dialog box looks like this:
In earlier versions of Dreamweaver, it looks like this:
Dreamweaver asks if you want to include passwords and login details (this is the default option). Whichever option you choose will be applied to all sites, so click Cancel if you want to treat some sites separately, and export your sites in two sets by using Ctrl/Cmd-click to select them.
When you click OK, Dreamweaver asks where you want to export the definitions. Navigate to a suitable location, leave the File name field unchanged, and click Save. Although only one site name is listed in the File name field, Dreamweaver exports all the site definitions as .ste files in a single operation.
NOTE: This process backs up only the details of your sites, such as the location of the root folder, FTP details, and so on. It does not back up the actual files in your site, such as .html (or .php, .asp, .cfm) files, images, and style sheets. It's a good idea to use your normal file backup routine on your actual files from time to time, as well as exporting the site definitions.
In the event of losing your site definitions in Dreamweaver or moving to a new computer, open the Manage Sites dialog box, and use the Import button to navigate to your backup .ste files.
Often, if you don't have a backup of .ste files, you need to go through the whole process of re-entering the details for each site manually.
However, you might be able to restore them by using a restore point on Windows or Time Machine in Mac OS X.
On Windows, the site definitions for Dreamweaver CS6 are stored in the Windows Registry at HKEY_CURRENT_USER\Software\Adobe\Common\12.0\Sites.
In Mac OS X, they are at Macintosh HD:<username>:Library:Application Support:Adobe:Common:12.0:Sites:Site Prefs.
In recent versions of Mac OS X, the Library folder is hidden. In the Mac Finder, select Go > Go to Folder, type ~/Library in the search field, and click Go.
Dreamweaver CS5.5 site definitions are in the same location, except use 11.5 instead of 12.0. The numbers for CS4 and CS3 are 10 and 9 (without a decimal fraction) respectively. For earlier versions of Dreamweaver, substitute Macromedia for Adobe, and adjust the number accordingly.
If you don't have a backup of the actual files on your site, download the files from your remote server.