Liferay Migration
Liferay Migration
Liferay Migration
We need to clear data from old versions, duplicates and other unnecessary files.
Download Liferay 7.1 CE at this step
1. Create a database dump from 6.2 database and load it to new one:
yo liferay-theme:import
Liferay portlet migration
To migrate portlet code, use the Code Upgrade Tool in Liferay Developer Studio (Project ->
Liferay Code Upgrade Tool menu). After importing project we can click “Find breaking
changes” button, and a list of code problems will appear:
Each of them contains API changes explanation, which affects custom code, reasons for it,
links to Liferay JIRA tickets, examples and recommendations to fix code issues. Some of
code problems can be fixed automatically using Liferay IDE, other ones need manual actions.
After fixing all the issues, you can try to build the portlet for Liferay 7.1. If you work in IntelliJ
IDEA, you can copy migrated code to it from Liferay IDE.
Liferay hook migration
For hook migration (especially for JSP hooks) it’s better to create a hook module from scratch
and overwrite the required JSP page. As Liferay’s JSP pages have changed significantly from
Liferay 6.x to 7.x, using old 6.2 JSP pages for new 7.1 Liferay may break some functionality.
So, you need to create a hook module, find appropriate JSP, and overwrite it in hook, copying
changes from 6.2.
Then just apply these changes to your Liferay 7.1 page and deploy the hook.
Liferay layout migration
For layout migration we can create a new layout with Liferay IntelliJ plugin:
After that we can adjust FTL template according to the 6.2 code