Sign In  |  Register
 
 DotNetNuke Powered!
DotNetNuke Support Forums

How To: Upgrade DotnetNuke

Rate this topic:

Please Register to post a reply.
Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.

AuthorMessages
John Mitchell
Posts:3249



02/02/2007 10:31 AM  

Upgrading DotNetNuke is a process that comes as second nature to anyone that has been doing it a while, but we tend to forget that there are many new users who have never upgraded DotNetNuke.

In an over-simplified summary, the upgrade process for DotNetNuke is done by using the upgrade download package, and unzipping it over the top of your existing DNN files, then navigating to your site.  This will cause DNN to find the new code and it will automatically run any required SQL scripts to upgrade your Database.

There are a few things that you should do to prepare for your upgrade, and a few more things that you will need to be aware of so that your upgrade will go smoothly:

Step #1: Backup your current installation by making a copy of your DotNetNuke folder and a backup of your current Database.

  • TIP: What I like to do is to copy all of my DotNetNuke files to a different location for performing the upgrade, that way any live site will still be running, and if there are problems with the upgrade I can just start over.  To upgrade this way you will need to create an alternate website and also restore the backup of your database to an alternate name. You will also need to add a Portal Alias for this new location which you can do before you make the backup of the DB, or if you wait until after you have restored the copy of the DB then you can add the PortalAlias entry directly to the PortalAlias table.

Step #2: Get the [u]upgrade[/u] download package for the version you are wanting to upgrade to and unzip this package over the top of your copy of the current DotNetNuke files.

Step #3: You will need to copy any new items from this new version out of the release.config file into your current web.config file.

  • TIP: This process can be easier if you do it in the reverse.  In other words, copy any specific information from your current web.config to the release.config file, then rename release.config to web.config. 
    The following items will need to be copied over at a minimum:
    • Your connection strings (remember there are two places for these)
    • MachineValidationKey
    • MachineDecryptionKey
    • InstallationDate
    • codeSubdirectory

Step #4: Insure that your connection strings are pointing to the actual database that you want to upgrade.  If you have followed the backup tip above, then you will want to make sure that you connect to the alternate copy of your DB.

Step #5: Navigate to the url where you are upgrading your website, and DotNetNuke will automatically run any scripts needed to upgrade your DB.

You should now have an upgraded copy of your site to test that everything is still working as expected.  Or if you just backed up your live site and upgraded that one directly then you can test there. 

If you performed your upgrade on a copy of the website, then after you are satisfied that the upgrade is working as expected, you can easily upgrade your live site by shutting it down momentarily and then copying all the files from your upgraded folder back over to your live folder, and before turning your site back on make sure that your connection strings are pointing to your live DB.

 

sharindenver
Posts:54



02/02/2007 11:11 AM  

Hi John,

So do I need to add things to the release.config for the FCKEditor and for the Solpart menu? I have some extra "stuff" in my current webconfig for these (I think).

ETA: I think just the FCKEditor has differences/additions and I'm assuming I do need to add these.  :)

ETA:  ok... I am on a test box.  I changed the release.config then renamed to web.config after unzipping to the DotNetNuke folder.  I tried to open the site and I am getting The Page Cannot Be Displayed error.  It doesn't seem to be finding it at all, but it was before I tried to upgrade...

thoughts?  :)

John Mitchell
Posts:3249



02/02/2007 1:34 PM  
If you were able to navigate to your test box before the upgrade, then there should be no reason why you can't do it after the upgrade that I know of.

One thing you can try is to make the machine that you are using for the browser locate your test box by updating it's HOSTS file ( in \system32\drivers\etc )
If you are browsing to the site and it is on the same machine then you can put an entry in the HOSTS file using 127.0.0.1 as the IP address.
sharindenver
Posts:54



02/02/2007 2:05 PM  
Um... I feel the need to fess up to my stupidity. First of all, I unplugged my test box from the network so that there was no possible way I could "mess up" the live box. When I was trying to access the site, I wasn't using localhost, I was using an alias that it couldn't find because I wasn't on the network anymore (no access to the internet). Blush. Second, I had comment starting in web.config but not ending, so that just messed everything up. :) Upgrade has proceeded now and I have an error for version 4.0.4 and 4.3.1. But it says it completed successfully. So off to do some more!
sharindenver
Posts:54



02/05/2007 9:21 AM  
Ok... I have upgraded and can see my site. I cannot log in though. I tried host with my usual pw and it is not working. I also tried host with host pw and that did not work either. Is there somewhere in the db I can change the host pw without messing things up?
John Mitchell
Posts:3249



02/05/2007 9:26 AM  

Check to make sure your new MachineValidationKey and MachineDecryptionKey are the same as your old ones.
sharindenver
Posts:54



02/05/2007 9:34 AM  
ok... the new web.config had different keys. I should make them the same as the old one?  (I did that and cannot log in still)
John Mitchell
Posts:3249



02/05/2007 9:40 AM  

Yes, as noted in Step #3.

Make sure you copy over your MachineValidationKey and MachineEncryptionKey.

John Mitchell
Posts:3249



02/05/2007 9:42 AM  
Are you getting any other errors? Javascript errors maybe?
sharindenver
Posts:54



02/05/2007 9:45 AM  
When I originally saw your post, step #3 only had one bullet with info. the other three bullets were empty. :)

The new web.config does not have an installationDate... should I add it?
John Mitchell
Posts:3249



02/05/2007 9:49 AM  
Yes, add installationDate, that would be why your Keys were changed. DNN looks for that node to know if it needs to change the Keys.

Ok, you got me on that one about the original post, I do remember having to go back and fix that when it didn't show up.
sharindenver
Posts:54



02/05/2007 9:59 AM  
hehehe... np

Ok... so I added the InstallationDate. Looks good! thank you!
sharindenver
Posts:54



02/05/2007 2:38 PM  

I'm not sure if I should start a new thread with this or put it here...

I asked my boss for permission to upgrade the production box in a couple of weeks after I have plenty of time to test the upgrade on the test box.  I want to make sure I'm thorough.  Any guidelines in terms of testing an upgrade?  So far, with the upgrade, I am able to get to the site, log in, self register and emails are sent successfully, fill out a feedback form successfully.  The pages appear to display fine.  I'm not sure what else to do but I feel like maybe I need to do more before I tell my boss I have tested thoroughly!

Thanks!

John Mitchell
Posts:3249



02/05/2007 3:09 PM  

A good list of regression tests would be nice to have. I'll have to put that on my list of things to do.

Here is a short list off the top of my head:

Make sure you can change content on a few pages.
Make sure you can change Page Settings (title, keywords, etc.)
Make sure you can change module settings, and you may want to check your cache settings on modules because the latest versions have had some cache times set by default.
Logout after changing content to make sure the change happened as expected.
Check any pages with third party modules on them to make sure they are still working (DNN breaks modules at times).


sharindenver
Posts:54



02/05/2007 4:01 PM  
cool. thanks!
SplatMan_DK
Posts:81



05/14/2007 4:34 AM  
*LOL* ... you might consider adding the Snapsis PageBlaster configuration for the upgrade bullet list. I just wasted half an hour messing around with my config files because I was too tires (not enough coffee ...) to realize that I forgot to add my Snapsis config to the new installation

- Jesper

brgds

- Jesper
Terp
Posts:80



08/18/2007 5:41 PM  
Posted By John Mitchell on 02/05/2007 9:49 AM
Yes, add installationDate, that would be why your Keys were changed. DNN looks for that node to know if it needs to change the Keys.

Ok, you got me on that one about the original post, I do remember having to go back and fix that when it didn't show up.



My old web.config didn't have the installation date string, either. What is the proper syntax, if this is truly needed? I am searching the DNN forums, as the new release.config would not contain this entry.

I was just going to ignore this, since my old web.config did not have it, but the "needs to change the Keys" now concerns me.  ;)

 

 

John Mitchell
Posts:3249



08/18/2007 5:50 PM  

It looks like this and it doesn't mater what date you use, as long as the node is there with a date.

<appSettings><addkey="InstallationDate"value="7/9/2007"/></appSettings>
Terp
Posts:80



08/18/2007 6:45 PM  

Thanks, John.

Just so understand this, as it's perplexing to a newcomer and one who didn't have this line in his old web.config, without this line, DNN would change the machine keys during the upgrade? Even if this were the case, would it be as problematic as upgrading with the wrong keys (not chaning the machine keys in the release.config) or would it simply know it's generating new keys and make all the necessary changes where the necessary changes need to be made?  ..if that makes any sense.  :)

Nonetheless, I'll drop it in my new web.config now and cross my fingers...just trying to understand how all this works. I would think that if one is performing an upgrade and changes their keys, connection strings, et al, why would the package care when it was originally installed? ...seems moot to me in my myopic world.

John Mitchell
Posts:3249



08/18/2007 7:53 PM  
I can understand your confusion. This is a flag that was put in after one of the releases because the keys were initially made so that the keys were static which doesn't afford much protection when everyone is using the same one. So, code was added to the upgrade/install logic to change these keys and to determine that the change had already been made the new node was added. On a clean install this node will also be added, but it will not be added on an upgrade. The reason it is not added on an upgrade is because all the people that already had the initial default keys were stuck with them unless they decrypted all passwords and re-encrypted with new keys.

It would have been a lot better if the orginal default keys were used as the flag, and if they were there then they could have decrypted all passwords, changed the key and then re-encrypted all passwords. But adding the new node was easier.

This whole thing has really been a problem with DNN ever since. That is one of the reasons why you see all the posts about people not being able to login.


Please Register to post a reply.
Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.




ActiveForums 3.7
Visit our Store for great DotNetNuke Modules and Skins
DNNMasters Sitemap/Google Sitemap 3.0

Item codeSM3-01
Price$29.00
Product Information 
DotNetNuke CSS NavMenu 3.3 (Developers)

Item codeCSSNM33DEV
Base Price$149.00
Product Information 
Snapsis PageBlaster 3.3.2 for DotNetNuke - Professional Edition

AuthorJohn Mitchell
Base Price$79.00
Product Information 
XDAkuna (Web 2.0 CSS XHTML Skin)

Item codeXDAkuna
AuthorNina Meiers
Price$49.00
Product Information