« Back to Upgrade Instructions

Upgrade Instructions from 4.3 to 5.2

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

0 Attachments
37427 Views
Average (0 Votes)
The average rating is 0.0 stars out of 5.
Comments
Threaded Replies Author Date
This article needs to be more specific. **4)... Samuel Liu July 13, 2010 9:23 AM

This article needs to be more specific.
**4) Specify database connection and permission algorithm**
Where ought this be specified? There are many other parts of this article that also do not specify how or where to do things.

**1) Clean Liferay bundle 5.2.2**
Is there another wiki article about how to do it? Link or give steps.
Posted on 7/13/10 9:23 AM.