green field

Upgrading From Previous Versions

Rate this Content 3 Votes





As of version 2.2.1.5 we have automated updating the database, see the bottom of the page for manual upgrade steps for versions older than this.

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

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.

Upload the Setup folder first so you can be sure all the scripts are there first, then upload teh 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.

Always backup your site and your database completely before upgrading so that if anything goes wrong you can restore your previous installation.

If you are upgrading from very old versions and have a custom skin that you are using, it might be wise to change to one of the built in skins like subblue before the upgrade, then after you upgrade change back to your custom skin. Sometimes changes are needed in custom skins after an upgrade. We will try to keep changes like this to a minimum. If upgrading a site from the older 1.x version of mojoPortal, you must do this because skinning changed a lot in 2.0 .NET. Old 1.x skins will not work and must be modified to get them working.

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. 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.

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

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

Last updated 2007-08-13 Joe Audette

Upgrading From Previous Versions - Prior to v 2.2.1.5

Upgrading is a manual process for which I can offer guidelines. 


Guidelines for upgrading from previous versions of mojoPortal.

1.  Be sure and do a complete backup of both your web site and your db before proceeding so that if things don't workout you can go back easily to the previous version.

If you are planning to upgrade a production site I recommend doing a practice upgrade with a copy of your site and database. Then if all goes well you can cut over to the copy or at least have confidence that you can succeed in upgrading the production site.  For example if your site is www.mydomain.com, consider making a separate virutal host with a copy of the main site and db at dev.mydomain.com and do your upgrade on the copy.

2.  Upgrade the database structure.  You can go table by table comparing the the structure of your existing db with the CreateTables.sql script and adding tables and/or columns as needed to your existing db.  If you have the CreateTables script from your previous version consider diff the new file against the old to get a clue of what has changed.  If using MS SQL or PostgreSQL replace the existing stored procedures with the new script of stored procedure.

3.  Upgrade the data.  If new modules were added or old ones enhanced, there are likely to be new data for the mp_ModuleDefinitions, mp_SiteModuleDefinitions and mp_ModuleDefinitionSettings tables.  Again, you can diff the CreateData.sql script from your previous version against the new one for clues.
If there are new settings for existing ModuleDefinitions that you are already using, you may also need to add settings to the mp_ModuleDefinitions table which has settings instances of the module definitions you are using as represented in the mp_Modules table.

4.  Copy the new deployment files over the existing site. Make sure the connection string for your db is correct in the Web.config file and re-start apache or IIS.

5.  Make sure the Data folder and all of its children files and folders are writable. Previous permissions may be gone after overwriting.

Become a mojoPortal Consulting Partner
Share This Using Popular Bookmarking Services