
« Back to Upgrade Instructions
Upgrade Instructions from 4.3 to 5.2
Table of Contents [-]
Introduction#
This article discusses how to upgrade and to migrate Liferay portal from 4.3 to 5.2.
Overview#
In the 4.3, all portlets and themes are developed in the extension environment. Thus the portlets and themes have short names. In the 5.2, all portlets and themes are moved to the Plugins SDK environment. Therefore, the portlets and themes have long names.
Data Migration#
1. Preparation
- Clean the Liferay Portal bundle (5.2.x) – remove sample data;
- Dump data from source server (Liferay 4.3)
- Import data to target database server (suppose that database name: knovel, port no. 3306, user name / password: knovel/knovel)
- Specify database connection and permission algorithm (you need to set it to '2')
permissions.user.check.algorithm=2 jdbc.default.driverClassName=com.mysql.jdbc.Driver jdbc.default.url=jdbc:mysql://localhost/book?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false jdbc.default.username=book jdbc.default.password=book session.shared.attributes=org.apache.struts.action.LOCALE,COMPANY_,USER_,LIFERAY_SHARED_,KNOVEL_LIFERAY_SHARED_ session.enable.url.with.session.id=false live.users.enabled=true
2. Start Liferay Portal – The portal will perform the upgrade processes.
3. Stop the Portal
4. Change Release No.
update Release_ set buildnumber='5202', modifieddate=now(), verified = '1' where buildnumber='4301';
5.Find $userId for default user “$screenName”
select UserId, screenName, password_, active_ from User_ where screeeName=”$screenName”;
6.Find $roleId for the role “Administrator”
select * from Role_ where name="Administrator";
7. update the role of default user “jonas” to “Administrator”
update Users_Roles set roleId="$roleId" where userId="$userId";
Clean Liferay portal bundle#
1. Clean legacy portlets in the page
update Layout set typeSettings = replace ( typeSettings, 'state-max=86,', '');update Layout set typeSettings = replace ( typeSettings, 'state-max=88,', '');}}}
2. Update themes name
update Layout set themeId ='book_mktg_secondary_WAR_book_mktgtheme' where themeId='book_mktg_secondary';update Layout set themeId ='book_mktg_popup_WAR_book_mktgtheme' where themeId='book_mktg_popup'; update Layout set themeId ='book_mktg_alternate_WAR_book_mktgtheme' where themeId='book_mktg_alternate'; update Layout set themeId ='book_mktg_WAR_book_mktgtheme' where themeId='book_mktg'; update Layout set themeId ='classic' where themeId='brochure';}}}
3. Update portlet names
- Update portlet names in pages with long names. For example, in the Ext, we have a portlet named CONTENT_DISPLAY. Now it should be CONTENT_DISPLAY_WAR_${plugin.name}.
4. Restart the portal
Children Pages
37427 Views