Liferay Migration

Three Main Steps to Migrate Liferay Project

Halsson has more than 10 years experience developing and migrating Liferay projects. Here is an article describing the three main steps for a Liferay migration project.


1
Infra Migration


2
DB Migration


3
Code Migration

Infra Migration

The first step is to make sure the new infrastructure environment is up to date with Liferay DXP compatibility matrix. Depending on the target version, you can find the info from here. It’s essential that your system runs on a supported environment.

So, the new DXP environment should use the right application server, database server, operating system and JDK depending on the target version.

Database Migration

Once the infrastructure is ready, this step aims to migrate the database to a newer version. For that, it is recommended to use a copy of the production one. The original is always used in prod and the copy will undergo the changes.

Then the steps to follow are:

  • Optimize the database by performing a cleanup. For example, by removing the sites, organizations, roles and permissions that are no longer used, as well as old versions of web content and documents.
  • Import the copy into the new database server
  • Run the tool provided by Liferay to convert this database to a compatible one with the targeted version of Liferay
  • In the event of an error during the conversion, it is still important to:
    • Analyze errors and identify the problems;
    • Act manually: develop scripts as needed to fix problems;
  • Once the tool process is completed, launch the Liferay DXP server and examine the sites, organizations, web content, documents, permissions and any other data that existed in the old version.

At that stage, you’ll be able to have an up and running new Liferay with all data and documents and without any custom plugins.

Code Migration

This step concerns the migration of custom developed plugins. It does not apply to Liferay’s ootb plugins. So, it’s about custom portlets, hooks, themes and layouts.

Here are the steps to follow :

  • Define the list of plugins affected by the migration. By doing so, you can find some of them that are not anymore used or relevant;
  • Use the tools provided by Liferay to identify the changes to be made;
  • Start by migrating the modules with the fewest dependencies;
  • Liferay recommends keeping modules in web war archives and studying their migration to OSGI modules in another step. However, migrating certain types of plugins to OSGI modules in this phase is more profitable.

Once all plugins have been migrated, you should be able to deploy them on the new Liferay version.

At Halsson, we did several migrations and all of them were successfull, contact us from more informations.