We used cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it. What For?

« Back to Blogs

Liferay Migration Process From 6.2 to 7.1/DXP

Liferay migration process


Liferay 7.1 introduced significant changes with a lots of new features and improved functionality. Liferay introduces so many features in 7.1 in terms of web experience. As Liferay terminated support for CE edition, many of us are probably on the way of upgrading the old Liferay portal to the latest one.

In this blog, we will discuss the process of migration for one who wishes to upgrade/migrate to latest Liferay 7.1/DXP from Liferay 6.2.

Step 1: Prepare for migration

  • Before migrating the existing portal to 7.1 it’s recommended to remove unnecessary files and objects.
    • Remove unused objects
      • It’s good practice to find not required objects that can be deleted by examining the tables that were large or contained lots of records.
      • Here I’ve listed down some of the common entities to find unneeded objects.
        • Sites
          • Remove unused sites and it’s content.
        • Instances
          • Remove instance which is no longer needed. Since they consume highest object in the hierarchy, removing it can optimize upgradation process.
        • Web Content
          • Liferay generates a new version whenever we are updating any web content. You can safely delete all older versions of web content.
        • Users
          • Remove all inactive users and it’s related data to optimize the process.
        • Layouts
          • Remove unnecessary layouts.
        • Orphaned data
          • Find out orphaned data that are no longer used and remove all those data.
    • Remove duplicated structure names
      • For LR 6.2 you can have different web content structures in your portal, they are likely to have fields with the same names. But DXP requires unique field names of fields for structures. Therefore we need to rename structure to have a unique field name.
  • After removing unused objects from your portal, make sure to test those in your older environment. In that case, you can more easily find out any issues, knowing that they’re not related to upgrade processes.

Step 2: Liferay Database migration

  • In this step, we will migrate our database from LR 6.2 to LR 7.1. After removing unused objects now our portal is ready to migrate DB from 6.2 to 7.1/DXP.
  • Liferay provides a comprehensive database migration tool that will migrate our database using simple steps. Liferay recommends disabling search indexing before migrating the database.
  • Before migrating existing DB to LR DXP make sure that you have a backup of it. For more information about the migration process you can follow our Liferay Database migration from 6.2 to 7.1/DXP blog.

Step 3: Code migration

  • Once your database will migrate to DXP you need to update your existing code to make it compatible with DXP. Liferay provides code upgrade tool for it.
  • For JSP hook migration it’s better to create a hook module from scratch and overwrite the required JSP page. The reason behind that is because Liferay JSPs have changed significantly from Liferay 6.x to 7.x, so using old 6.2 JSP pages for new 7.1 Liferay may break some functionality.
  • You can follow LR’s documentation to upgrade your existing code to LR DXP

Step 4: Change in Deployment Process

  • As we know Liferay DXP adopted OSGi framework container which is based on modules based application. Due to this reason deployment process in LR has been changed.
  • You can still use WARs in liferay but it is not recommended as you lose access to any services which are deployed in OSGI container. If you deployed WAR to OSGI container LR will convert it to WAB which is web archive bundles. This will be recommended for deploying legacy applications.
  • It’s better to use bundles which are nothing but JARs with OSGI metadata.

Step 5: Post-migration issues

  • Once code and database will be migrated to LR DXP, please make sure to regenerate the search index after the upgrade.
  • Here I’ve added some of the common post migration issues which generally happen.
    • You must first upgrade to Liferay Portal 7100
      • This exception will be thrown when you started LR 7.x with 6.x database. To resolve this issue you need to re-run the database upgrade tool before starting LR DXP.
    • PwdEncryptorException: invalid keyLength value
      • You will face this kind of exception when an incorrect password encryption algorithm. To resolve this error you need to add below property in the portal.properties file.

Step 6: Search Engine

  • From Liferay DXP, they have integrated elasticsearch as an embedded search engine. For production use, Liferay only supports Elasticsearch when it runs in a separate JVM. Liferay recommends that elasticsearch servers should be provisioned with a minimum of 8 CPU cores and 16GB of memory.
  • If you need to use Solr, it’s also supported in Liferay Portal. Basically, you will require a separate search server to maintain the whole portal to work smoothly.

I hope that this will help you to migrate your portal from 6.2 to DXP. If you still have any queries we provide service of the Liferay portal upgrade from older versions to newer versions of Liferay DXP.

contact-us Request a callback WhatsApp