Liferay Upgrading process

In one of the projects,we upgraded Liferay from 6.0 to 6.2. In this tutorial, I will explain about upgrade process, probably which would save time.

Activities in Liferay upgradation from 6.X to latest:

  • Remove Depcrated classes
  • Database Upgrade and migration
  • Liferay server setup to new version
  • Content Migration
  • Liferay permissions and password encryption algorithms configuration in portal-ext
  • Plugin Migration to latest plugin SDK

Liferay provided abstract class “com.liferay.portal.kernel.upgrade.UpgradeProcess.java”to implement custom DB upgrade also. portal.properties lists all upgrade classes along with versions

upgrade.processes.master=\
com.liferay.portal.upgrade.UpgradeProcess_6_0_0\,\
com.liferay.portal.upgrade.UpgradeProcess_6_0_1\,\
com.liferay.portal.upgrade.UpgradeProcess_6_0_2\,\
com.liferay.portal.upgrade.UpgradeProcess_6_0_3\,\
com.liferay.portal.upgrade.UpgradeProcess_6_0_5\,\
com.liferay.portal.upgrade.UpgradeProcess_6_0_6\,\
com.liferay.portal.upgrade.UpgradeProcess_6_1_0\,\
com.liferay.portal.upgrade.UpgradeProcess_6_1_1\,\
com.liferay.portal.upgrade.UpgradeProcess_6_2_0

Steps for Liferay upgration:

The migration process would be carried out into two phases :

  1. Migration of Liferay v6.0 to 6.1
  2. Migration of Liferay v6.1 to 6.2

The below given steps needs to be followed iteratively for both the phases :

  • Liferay plugins migration:  In this step, update the portelt,theme,hook etc plugins in latest Liferay SDK
  • Migrating to Password Encryption Algorithm:  We would also need to take care of the default values that have changed from the current version to the Upgraded version. It includes the :
    • Permission Algorithm
    • Password Encryption Algorithm, etc.

For example Liferay 6.0 and 6.1 by default uses SHA Algorithm for Password encryption whereas the Liferay 6.2 uses a more powerful algorithm : PBKDF2WithHmacSHA1/160/128000

So while migrating the liferay from 6.1 to 6.2 it would by default uses PBKDF2WithHmacSHA1/160/128000 for the password encryption. But in case if we want to use  the older version of password encryption algorithm (may be for performance reason) we can mention it in the portal-ext.properties.

passwords.encryption.algorithm.legacy=SHA

  • Migrating Image Gallery to Document Media  : The Liferay Portal 6.0 uses Image Gallery for  managing the images. But in the later versions of Liferay this feature is merged with the Document and Media which means the images from the Image Gallery needs to be Migrated to Document and Media

 

  • Database backup and upgradationDatabase backup of the existing server
  • Liferay server setup and start:
    • Take the latest liferay server bundle
    • change database configuration and point to old version database
    • start the server and observe  the logs for any errors
    • It will take time to upgrade 200+ tables in liferay
    • Now liferay database has update to latest version
  • Rerun lucene indexes
    • Remove the lucene folder   {liferay-home}/data
    • re run the all lucene index

If there are no errors , then you are lucky that Liferay upgraded to latest version. Hope this helps.

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *