In previous posts I described how WebMatrix can be used to download DotNetNuke and install it on your local computer and how you can use WebMatrix to publish your DotNetNuke site to a Hosting Provider.
Some of you have probably already been asking the question – “Does this ability to publish allow me to update my remote site from my local version?”, and the answer is a qualified yes.
Lets first modify the local site.
I have modified the content on the home page to show an image. I won’t show all the steps to do this as most of you know how to do this, but Figure 1 shows the resulting updated Home page.
Figure 1 – The Updated Version of the Home Page on the Local Site
Now that my local site has been updated I select Publish from the WebMatrix toolbar (Figure 2) – in exactly the same way as I did to initially Publish the site.
Figure 2 – Publishing the updated Local Site
We are now presented with the same Publish Preview screen (Figure 3), although the list of files is much smaller. In this case I have a new File in the Portal Home Folder – the image I uploaded and added to the Front Page), and two Module Caching files. By default all the files which are different are selected , but in this case we don’t need to Publish the caching files (although it doesn’t actually hurt).
Figure 3 – Updating the Remote Site
Clicking Continue will deploy all the modified files and update the database.
That’s it – your changes have been re-published, and the live version will reflect the changes you made – so why was my answer a “qualified” yes. The reason for this is the comment in yellow in Figure 3 – “Publishing will overwrite any remote databases” – i.e. your remote database is dropped and the data replaced by the data on your local database.
This is fine if all changes are made from your local site, but if you have any updates on the remote site (new users, forum posts, comments etc.) these will be lost when you re-publish.
If Microsoft ever offer the ability to do differential updates to the database then my answer would be much less qualified. Having said that, if your site is a simple content only site you may be able to use this approach to maintain your site.
This article is cross-posted from my personal blog