posted on April 19, 2005 00:16
In traditional ASP.NET development, a typical move from development to production (for a brand new install) might involve:-
- Copying your files to production.
- Creating a database in production and running the necessary scripts to initialize your database
- Performing any configuration necessary. (Connection Strings etc)
An upgrade of an ASP.NET application might take the following the steps:-
- Copying your files to production. (Replacing existing files).
- Run sql scripts to update your database to the latest version.
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 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:-
- “The Clean Install”
- “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:-
- Copying your files to production. (just like asp.net)
- The difference comes when creating the database however. Your options are:-
Performing any configuration necessary. (Connection Strings, File Permissions etc)
- 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).
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:-
Note: Some modules do not export/import there content (3rd party modules). All core modules provide this functionality however.
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
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.