Download, edit, and republish your website with WebMatrix
This walkthrough shows you how to download a site you have already published to the web, make changes to it, and republish it to your hosting provider.
What you'll learn
How to download your site's contents to WebMatrix.
How to preview what will be downloaded.
How to use WebMatrix to edit and test the site locally.
How to use WebMatrix to republish the site.
What you'll need
To run the steps in this procedure you must be running Windows XP SP3 or a later version of Windows. You'll also need to have WebMatrix installed. For information about how to install WebMatrix, see Microsoft Web Platform Installer.
After you have published a site, you might want to make changes to it, even if you do not have the original files on your local computer. Perhaps you suffered a hard disk crash, or maybe you made a lot of changes but have become unhappy with the results. In a case like this, it might be easier to just download the published files and start again. WebMatrix lets you download your existing site from your hosting provider's server, edit the site, and then republish it. This WebMatrix feature can download both files and databases.
This tutorial shows you can download a published site, edit the results, and republish it.
The Example Website: Contoso's Strawberry Shortcake
For this tutorial, imagine that you are working with a fictional website that sells strawberry shortcake. Assume that you previously created the site but later lost or discarded the site files. The example site's Default.htm file has the following markup in it:
<title>Contoso's Strawberry Shortcake</title>
<h1>Contoso's World Famous Strawberry Shortcake!</h1>
<img src="strawberry_shortcake.jpg" alt="Strawberry shortcake"/>
When you visit the published site, here is how it looks:
You have decided that, although the picture looks tempting, you would like to enhance its appeal by altering the background color of the page.
Downloading the Published Site with WebMatrix
The original files are no longer on the computer that you are using, so you can use WebMatrix to download them. First, you can launch WebMatrix and choose My Sites:
In the Choose a Site dialog box, you select your site (in this tutorial, the Contoso site) and then click OK.
You then click Files to go to the Files workspace. You can click the down arrow below the Publish button and select Download Published Site.
The Download Preview shows you the files that will be downloaded. Click Continue.
The files from the site are copied from the published website to your computer.
Using WebMatrix to Edit and Test the Site
After the download completes, to get the effect you want, you would open the Default.htm file in the WebMatrix editor. You then add the
bgcolor attribute to the opening
When you are finished, you click Save.
To test the edited site before you republish it, you click Run.
The new version of the page appears in the browser.
Using WebMatrix to Republish the Site
To send your changes to the live website, you can now click Publish.
The Publish Preview dialog box shows you the files that will be uploaded to the server. Only files that have changed will be published. In this case, only the Default.htm file was changed, so it's the only file that will be uploaded. To upload the changes, you click Continue.
Viewing the Results
After the site has been republished, you can browse to the live site to confirm the finished result.