Upgrading From Previous Versions

Before you Upgrade

It is a very good idea to backup your site and your database completely before upgrading so that if anything goes wrong you can restore your previous installation.

Its a good idea to login to your site as admin before uploading the files for upgrade.

Note: The latest version of mojoPortal requires .NET 4.5 hosting, if you are upgrading a very old version you may require different hosting than what you have now. Check with your host to find out if they provide .NET 4.5.

IMPORTANT Always backup your Web.config file before upgrading, so you have a copy from which to restore customizations such as the machine key to the new Web.config. If you are using encrypted passwords you must always keep the same machine key in your Web.config or it will not be able to decrypt passwords and this will lock out all users. You must always use the new Web.config file to get any new or changed settings therefore you should keep notes about your customizations to Web.config and be able to restore those customizations on the new Web.config

Visit the Administration > System Information page in your site to find out your current version of mojoportal-core. Review the release announcements in the blog for any releases between your current version and the latest version in case there are notes about changes you need to make for configuration or skins. There is a full list of releases with links to release notes at the bottom of the download page.

Upgrading is basically the same as initial installation. You upload all the files and then visit /Setup/Default.aspx to run the database upgrade scripts.

I recommend FileZilla as a good FTP client for Windows, that is what I use to upload files.

To use the latest version of mojoPortal make sure the .NET framework you are using is 4.5 or higher. You can our download packages on our Codeplex download page.

You do not need to upgrade version by version, you can upgrade directly to the latest version from whatever current version you have, the setup system knows all the scripts it needs to run to update from your current version to the newest version.

Taking the Site Offline

It might be wise to take the site offline before you upload the files particularly if uploading the files is going to take a while which is often the case. ASP.NET has a built in feature to allow you to do this, simply create a static html page (make it as pretty or as plain as you like but put a message on there explaining that the site is offline and when you expect it to be back. If you put this file in the root of your web site and name it App_Offline.htm the ASP.NET runtime will disable your site completely. So this is a good thing to do when uploading files during upgrades and also for other tasks such as when you are restoring a database from a backup. However, it is important to note that this will also disable the setup page so after you upload all the files you need to rename the App_Offline.htm file to something else in order to bring the site online so you can run the setup page at /Setup/Default.aspx

Uploading the Files

Upload the Setup folder first so you can be sure all the scripts are there first, then upload the ClientScript folder, then the Data folder, then upload the rest of the files. I find this approach works best because if you try to upload all the files at once sometimes there are ftp errors and they don't all make it. Breaking it up a little helps avoid this. After all the files are uploaded, its a good idea to upload the Web.config file again at the end, this recycles the application to make sure all the new files are detected. Finally navigate to yoursiteroot/Setup/Default.aspx and the setup routine will do the upgrade.

Always use ALL of the new files including the new Web.config to be sure you aren't missing any settings. Then restore any customizations to your new Web.config. Most of the settings that you would want to customize like connection string and other settings can be put in user.config to make it easier to keep your custom settings during upgrades, see the Web.config Guide for more info.

Copy the new files over your old files then edit the Web.config and user.config (if you are using a user.config file) to put back your correct custom settings like connection strings, smtp settings etc. You can get these settings out of your backup files.

After uploading all the files you should recycle the web application (this is not needed if you took tha site offline prior to uploading as described above). One easy way to recycle the web application is to modify the Web.config file. If you are working directly on the server you can just type a space in the Web.config file and save it and this will cause the application to recycle. If you are working remotely it is sufficient to download and then upload the Web.config file again, or your web hosting control panel may have a button to recycle the application.

Navigate to yoursiteroot/Setup/Default.aspx to complete the upgrade.

See also Upgrading Information for Skins

Upgrading From Very Old Versions

If you are upgrading from a very old version of mojoPortal, you need to be aware of some significant changes over time that may affect your ability to upgrade.

  • Version of mojoPortal was the last version of mojoPortal to support .NET 2.0, in order to upgrade from a version that old you need to be able to change to.NET 4.5 hosting
  • Version was the last version to support .NET 3.5 or 4.0, to upgrade you need .NET 4.5 hosting
  • Version of mojoPortal was the last version to support MS SQL 2000 database, all newer versions of our MS SQL data layer require MS SQL 2005/2008/SqlAzure. It is possible to migrate by making a backup of your database from SQL 2000 and then restore it on SQL 2005/2008.

If you have any troubles post in the installation forums and we will try to help.


Last Modified by Joe Audette on Apr 20, 2015

Monetize Your Site With Site Membership Pro!