Search

View Article

19

In traditional ASP.NET development, a typical move from development to production (for a brand new install) might involve:-

  1. Copying your files to production.
  2. Creating a database in production and running the necessary scripts to initialize your database
  3. Performing any configuration necessary. (Connection Strings etc)

An upgrade of an ASP.NET application might take the following the steps:-

  1. Copying your files to production. (Replacing existing files).
  2. Run sql scripts to update your database to the latest version.

Understanding DotNetNuke

Source Code

The major difference between DotNetNuke and traditional applications is that it has a number of files that are actually modified in production and you do not want to replace these when publishing.

The other major difference is that DotNetNuke contains a number of sub-applications known as modules; these are designed to be deployed into production through the installation interface.

It is for this reason, you do not want to continually publishing from development to production. You should however, copy up new files when:-

  • DotNetNuke changes (new version) – upload new files and watch it auto-upgrade to next incremental version.

You will want to use the installation interface when:-

  • Module changes (new version of a module) – upload through installation interface and watch it auto-upgrade to next incremental version.
  • Skin change (new version of a skin) – upload through installation interface.

Content

Content is slightly different however, each dotnetnuke installation is broken into many portals, each segmented in the database providing that portal’s content. Publishing a site up each night, would not copy the content across. You must use one of the methods described in the next section.

There are a few ways of moving a DotNetNuke site to production dependant on the scenario, some of these are:-

  1. “The Clean Install”
  2. “The Export/Import”

The Clean Install

The clean install method is used when you have no existing production site. You want to move exactly what you have in development to production.

You would normally:-

  1. Copying your files to production. (just like asp.net)
  2. The difference comes when creating the database however. Your options are:-
    • Backup/Restore your database to production; this will copy all of your data out of development, as well as module settings, etc. Make sure you add a portal alias for your new url to Admin -> Site Settings before doing the backup and restore!
    • Create a new database, and let DotNetNuke initialize the database when running the application. You will then have to install any modules, skins, etc. You will then have to export and import your portal (see below).
  3. Performing any configuration necessary. (Connection Strings, File Permissions etc)

The Export/Import

The export and import is ideal for moving a site to production where the production site already exists and you simply want to add a portal. You will first need to make sure your production site has all the modules installed, and potentially skins.

You can then Import/Export your portal, using the technique described in this article:-

http://www.smcculloch.net/Home/tabid/35/ctl/ArticleView/mid/363/articleId/54/ExportingAndImportingDotNetNukePortals.aspx

Note: Some modules do not export/import there content (3rd party modules). All core modules provide this functionality however.

Issues

Incremental Content Changes

The problem with content arises with incremental changes, currently, the core modules are not versioned, and this is left up to the developers. So you can’t really make non-live changes to your production site to existing content. New content is fine because you just hide it to everyone except admin while in the test mode.

My News Articles module doesn’t actually post an article until it has been approved, so it is a good way of holding back on a piece of content.

You are left to best manage this, even if it means a bit of copying and pasting. L

Conclusion

While not a straight forward process, or a single path to success. Once DotNetNuke is installed and running, it should not provide any great issues, the versioned core and modules provide an excellent way of constantly upgrading your site. Staging existing content proves to be the only difficulty.

Any thoughts, please post in the comments section for all to see.

Posted in: DotNetNuke

Post Rating

Comments

Bradley Molzen
# Bradley Molzen
Tuesday, April 19, 2005 7:29 AM
Great Article Scott. You've just answered 20% of the posts on the DNN asp.net forums.

May want to mention stuff like the Debug/Active setups, IIS setups, files you don't need anymore, etc. for a production setup? Security type stuff now that the portal is open to the public.

Great stuff though.
Anonymous User
# Anonymous User
Monday, December 12, 2005 6:47 AM
Scott-

I know your news module has content approval built into it, but what if my organization would like to have content managers update content then an admin would approve the content for publishing (live).

I was thinking about using a dev server (in-house) that content managers could make changes, then upload the changes to our hosted site via a SQL DTS job/site file comparison/copy. This make me nervous though, because things could easily get out of synch.

I think content staging will be a must for future DNN core releases (at some point).
Anonymous User
# Anonymous User
Wednesday, February 1, 2006 1:56 AM
Just a small point but on a new install you need to remember to make the destination directory an Application in IIS.
Brian C
# Brian C
Wednesday, September 20, 2006 10:10 AM
I found a small problem with your link in this article (loaded a blank page for me) but this link seems to be it

http://www.ventrian.com/Resources/Articles/tabid/213/articleType/ArticleView/articleId/54/Moving-DotNetNuke-Sites-from-Dev-To-Prod.aspx

(I just put the article ID into the current url)
#
Wednesday, February 7, 2007 1:05 PM
HOW TO: Move a DotNetNuke installation
#
Wednesday, February 7, 2007 6:05 PM
HOW TO: Move a DotNetNuke installation
#
Thursday, February 8, 2007 7:12 AM
HOW TO: Move a DotNetNuke installation
Anura
# Anura
Monday, April 9, 2007 11:50 PM
How can I export database changes to production environment?

Post Comment

Only registered users may post comments.