Upgrading to Liferay Portal 6.2 EE

For many customers, upgrading your Liferay platform can be a significant step forward for users, administrators and developers. Not only does an upgrade provide you with the “latest and greatest” version of the Liferay platform—complete with all the newest features—but you also ensure continued support for your Liferay environment.

Liferay Support recognizes that an upgrade requires a significant investment of time, planning and resources that will likely require the coordination of multiple teams and tight timelines. This article is designed to assist you in the preparation and execution of an upgrade to Liferay Portal 6.2, and is meant to be a quicker (though less comprehensive) article than the Liferay User Guide.

Resolution

In almost all cases, the most demanding task in a Liferay platform upgrade is the development, rebuilding and testing of all custom hooks, themes and plugins. With a new version of Liferay Portal comes changes to the Liferay API and the updates that ensue can take weeks, months or more.

Because this rebuilding aspect can take the longest, many customers start work on updating their customizations immediately, while concurrently running through the upgrade steps in a test environment, using their database and core data.

Pre-Upgrade

Below are the steps to prepare for and execute a Liferay Portal upgrade. It is highly recommended that you first validate these steps in a test environment before attempting in production. Please note that environment specific planning and analysis is key to a smooth upgrade.

1. Back Up Data

The most important step you can take to prepare for an upgrade is to back up your database, your documents and media, and any other data that may be required to restore your environment to pre-upgrade status. This should be done for both the test upgrade and when the production environment is upgraded.

Make sure that in addition to backing up the data, your team has a rollback plan for reverting the database, document library, and any other aspect of your portal. Also, remember to make clearing the server cache part of the rollback plan.

2. Verify the Working Order of the Portal

Any data issues with your current environment should be resolved with the help of our Subscription Services Team before attempting an upgrade.

3. Obtain an Activation Key

If you are planning to register the 6.2 instance using your Order ID, you can skip to step 4. If you are upgrading from a pre-6.1 version of Liferay, you will need to request an activation key.

4. Download Liferay 6.2

The upgrade can be done one of two ways depending on your requirements

  1. Liferay 6.2 Bundle
  2. Liferay 6.2 WAR (and dependencies)

Upgrade instructions for each option will be included below.

5. Upgrade Permissions Algorithm (When Upgrading From Pre-6.0)

Liferay instances must be operating with permissions algorithm to 6 before upgrading to Liferay 6.2. If upgrading from Liferay 6.0 or 6.1, you should be set as the default algorithm is 6 (check portal-ext and portal.properties if you’re unsure).

However, if you are upgrading from pre-6.0, additional steps will be required:

  1. (Optional) Switch the multi-value map to storage in memory rather than the disk for faster permissions upgrade. Details are available here: Upgrading to Permission Algorithm 6.
  2. Upgrade to Liferay 6.0
  3. Review system to verify that permissions are functioning properly.
  4. As administrator, navigate to Control Panel > Server Administration > Data Migration
  5. (If necessary), under Convert legacy permission algorithm, check Generate Custom Roles
  6. The Generate Custom Roles checkbox exists to simulate any permissions granted to specific users (as Algorithms 5 and 6 do not support adding permissions at the user level).
  7. Click Execute and let the permissions upgrade run.
  8. Restart your server.

At this point, it is essential that roles be tested and "cleaned up."

5.5 Note on upgrading Image Gallery

Starting in Liferay 6.1, the image gallery and document library have been combined to form the Documents and Media portlet. No special steps are necessary to upgrade the images. Simply make sure the 6.2 portal-ext.properties file contains the appropriate portal property for your previous method of image storage:

image.hook.impl=com.liferay.portal.image.DatabaseHook

image.hook.impl=com.liferay.portal.image.DLHook

image.hook.impl=com.liferay.portal.image.FileSystemHook

By default, Liferay 6.0 used the FileSystemHook. If you never customized this property for your installation, you’d use the FileSystemHook property above. If you customized the property, you should know which one you used, and it is likely already in your portal-ext.properties file.

If you’re using the FileSystemHook, you should also specify the image root directory in your portal-ext.properties file. This enables the FileSystemHook to allow data migration from other hooks. Here is the default property setting:

code>image.hook.file.system.root.dir=${liferay.home}/data/images

6. Prepare portal-ext.properties

Depending on which properties have been set in the past, you may be fine simply copying over your old portal-ext.properties to your new bundle/app server. However, it is worth reviewing some changes to the default property settings in Liferay 6.2 (See the Developer Network section, Review the Liferay 6.2 Properties Defaults, for more information). You may need to add legacy.properties from the old version in the case that those properties have been modified or removed from the new version.

7. Prepare Application Server

a.) Bundle

  1. Copy the contents of the “data” folder to the new bundle.
    1. If documents are being stored here, or if you’re using another file-store, this is not necessary.
  2. Install any additional required .jars that were installed in previous environment.
  3. Deploy the latest fix packs from the Customer Portal using the Patching Tool.

b.) WAR File (Manual)

  1. Verify that your application server is supported for Liferay 6.2.
  2. Note: If your particular application server is not supported for Liferay 6.2 and you would like to continue receiving support, please work with your internal IT staff and account manager to achieve an acceptable resolution.
  3. If the application server will be staying the same, then undeploy the old version of Liferay Portal
  4. Place the dependency .jars 
  5. If you’re using the same application server, you’ll need to remove the old dependency files from the application server.
  6. Complete any other steps that are relevant for your particular app server (beyond the scope of this article).
  7. Deploy the new Liferay Portal .war file
  8. Deploy the latest fix packs from the Customer Portal using the Patching Tool.

Upgrade

8. Start Liferay

Being pointed to the old database via the portal-ext.properties, Liferay Portal will automatically detect the previous version and run the appropriate upgrade classes to convert the database to Liferay Portal 6.2

Post-Upgrade

9. Reindex

Navigate to the Control Panel → Server Administration and click on Reindex all search indexes.

10. Redeploy Plugins

  1. Navigate to Liferay Marketplace
  2. Download 6.2 versions of all previously installed plugins.
  3. Deploy all (customized and marketplace) 6.2 plugins to Liferay.

11. Test the new 6.2 version

After an initial browse of the portal, have your QA team run tests to verify that everything survived the upgrade and is working. Performance tests are crucial as well to ensuring that your environment works as anticipated. Note that tuning may need to occur on this new version of Liferay.

Regarding Web Content Viewable by Guests: Please note that starting with 6.2 SP9, web content that was previously viewable by Guests will no longer be viewable by Guests.  To allow Guests to view the web content again please follow the steps in the following article: Web Content Permission Change Starting With 6.2 SP9 

Additional Information

If an upgrade attempt fails, do not continue to attempt upgrades on the same database. First fix the underlying issue and then attempt the upgrade once more with the backed up version of the database.

If there is data in *quartz_ tables, Liferay Portal 6.0 users may utilize the Quartz Portlet to migrate scheduled jobs to the upgrade version.

Having trouble upgrading? Liferay Global Services offers solutions to fit your needs. Please contact us for a free consultation.

Was this article helpful?
0 out of 0 found this helpful