HOW TO: Move a DotNetNuke installation

A lot of posts in the Install It! forum are from people wonder how to move their DNN installation from their development environment to production. In a nutshell, this is the process:

  1. in your dev environment add a new http alias for the production environment. You can do this in Admin > Site Settings, but only when logged on as host. For instance, if your dev site runs under http://localhost/dotnetnuke, and your production site will run under http://www.mydomain.com, you should add www.mydomain.com as http alias. Why is this important? Always, when DNN receives the first page request, a lookup against the defined portal aliases is done. If the hostname that is used to request pages from DNN is not found in the list of portal aliases, DNN will redirect to the first available portal alias of the first portal. Quite often this will be your dev environment. A common mistake is to not add the portal alias, and thus be redirected to your devsite when browsing to your production site for the first time
  2. Move your database to the production database server. There are a couple of ways of doing this. You can do a backup of your dev DB, and restore it (or have your provider restore it) on your production db server. The problem i have with this approach is twofold: if the db collation of the production server is different than the collation of your dev db server, you could get into troubles when using modules that use temporary tables. The collation of TempDB is always the same as the server collation, while the collation of the database is copied over from the dev db during the restore. The other problem you might run into with this approach is the fact that although usernames might match on both servers, in reality they are not the same. The security id (SID) will be different, so you will not be able to use the same user, and also, you will have an orphaned user in your production database.
    Alternatively, you can simply detach your db from your dev sql server and attach it to the production server. This might also cause issues with collation and user id's.
    The method i like myself is a bit more expensive: database comparison, but works very good. I almost always use the tools from Red-Gate, SQL Compare and SQL Data Compare. These tools automate the comparison between to databases to a very high degree. A great plus of these tools is that you can use them to keep your development database and your production database in sync as well. Just run Data Compare, and the contents of the 2 db's will be the same again.
  3. Move all the files in your dnn application folder to the production folder. This can be done by ftp or any other method you use to copy files.
  4. Make the appropriate changes to web.config. At the very least you should change the sql connection string, to have dnn look at your production db
  5. Browse to your production site... done

I found a couple third party blog posts about moving DNN and moving databases:

Please, no questions / discussion in comments to this blog. I am going to maintain a FAQ about this in the forums, if you have any further questions, please ask them in the Install It! forums, i will pick them up there and answer in the Faq post.

Comments

There are currently no comments, be the first to post one.

Comment Form

Only registered users may post comments.

NewsArchives


April 2014 (3)
March 2014 (3)
February 2014 (4)
January 2014 (6)
December 2013 (6)
November 2013 (2)
October 2013 (9)
September 2013 (10)
August 2013 (8)
July 2013 (4)
June 2013 (8)
May 2013 (13)
April 2013 (2)
March 2013 (7)
February 2013 (7)
January 2013 (10)
December 2012 (6)
November 2012 (20)
October 2012 (12)
September 2012 (27)
August 2012 (29)
July 2012 (22)
June 2012 (17)
May 2012 (23)
April 2012 (24)
March 2012 (27)
February 2012 (21)
January 2012 (12)
December 2011 (18)
November 2011 (20)
October 2011 (27)
September 2011 (17)
August 2011 (18)
July 2011 (45)
June 2011 (22)
May 2011 (23)
April 2011 (19)
March 2011 (36)
February 2011 (19)
January 2011 (22)
December 2010 (29)
November 2010 (37)
October 2010 (32)
September 2010 (43)
August 2010 (46)
July 2010 (37)
June 2010 (46)
May 2010 (29)
April 2010 (38)
March 2010 (27)
February 2010 (33)
January 2010 (34)
December 2009 (13)
November 2009 (20)
October 2009 (29)
September 2009 (18)
August 2009 (29)
July 2009 (19)
June 2009 (18)
May 2009 (23)
April 2009 (16)
March 2009 (13)
February 2009 (20)
January 2009 (25)
December 2008 (25)
November 2008 (29)
October 2008 (34)
September 2008 (33)
August 2008 (36)
July 2008 (31)
June 2008 (25)
May 2008 (26)
April 2008 (33)
March 2008 (31)
February 2008 (24)
January 2008 (18)
December 2007 (27)
November 2007 (51)
October 2007 (24)
September 2007 (32)
August 2007 (24)
July 2007 (20)
June 2007 (28)
May 2007 (27)
April 2007 (24)
March 2007 (47)
February 2007 (21)
January 2007 (41)
December 2006 (21)
November 2006 (16)
October 2006 (24)
September 2006 (36)
August 2006 (30)
July 2006 (31)
June 2006 (37)
May 2006 (13)
April 2006 (13)
March 2006 (18)
February 2006 (20)
January 2006 (13)
December 2005 (6)
November 2005 (15)
October 2005 (15)
September 2005 (16)
August 2005 (7)
April 2005 (1)
March 2004 (4)
February 2004 (6)
January 2004 (1)
November 2003 (4)
October 2003 (22)
September 2003 (22)
August 2003 (15)
July 2003 (14)

Copyright 2014 by DNN Corp | Terms of Use | Privacy | Design by Parker Moore Design