Liferay DXP version Upgrade_ From 7.x to 7.4

The upgrade from 7.x to Liferay 7.4 is a transformative shift designed to align your platform with today’s dynamic digital demands.

Liferay 7.4 offers a vastly improved, modular architecture, cutting-edge tools, and the flexibility to create personalized digital experiences effortlessly.

Upgrading to 7.4 ensures your platform is leaner, faster, and ready to tackle tomorrow’s challenges while delivering seamless and engaging experiences to users.

Now that you are already here, it is obvious that you want to know about how to seamlessly upgrade to Liferay DXP 7.4. Say no more! We are here to make it as easy as possible for you. Scroll down to upgrade 7.x to Liferay DXP 7.4 with us.

Liferay DXP 7.4: New Features and Developer Benefits

Here are some outstanding features of Liferay DXP 7.4. These features position Liferay DXP 7.4 as a powerful, flexible, and future-ready platform for modern enterprises.

blog_liferay_upgrade_7_x_to_7_4

1. Advanced Content Management with Enhanced Performance Metrics

Liferay 7.4 offers powerful tools to analyze and optimize your digital content:

  • A/B Testing: Experiment with various page elements, not limited to buttons, for improved engagement.
  • Content Performance Analytics: Track organic and paid search performance directly within Content, Widget, and Display Pages.
  • Content Audit: Organize and filter content efficiently to streamline digital asset management.

2. Low-Code/No-Code Capabilities for Business Users

Empowering non-technical users with intuitive tools:

  • Adaptive Image Sizing: Automatically optimize image sizes for Content and Display Pages.
  • Enhanced Forms: New field types and properties simplify data collection.
  • Adaptive Image Sizing: Build custom business objects directly through the user interface.

Read More: Low-code/No-code features for Business Growth with Liferay DXP Explained

3. Improved B2B Commerce Experience

For organizations with complex B2B needs, Liferay 7.4 offers:

  • Dynamic Pricing and Discounts: Effortlessly update pricing structures to suit business demands.
  • Visual Organization Widgets: Enhance clarity by visually representing organizational hierarchies.
  • Optimized Product Images: Ensure product visuals are displayed in the right dimensions.

4. Smarter Site Navigation and Organization

Liferay 7.4 simplifies content-heavy site management:

  • Navigation Menu Enhancements: Seamlessly add Display Pages as navigation items.
  • Asset Libraries: Enable better organization and reusability of digital assets with Display Page Templates.
  • Content Staging in Asset Libraries: Streamline content creation and review processes.

5. Enhanced Security and Enterprise Integration

Liferay 7.4 strengthens enterprise connectivity and security with:

  • Multi-Factor Authentication (MFA): Ensure secure access to online services.
  • Click-to-Chat Integration: Easily embed third-party chat solutions for real-time communication.
  • Headless APIs: Utilize robust RESTful APIs for seamless system integrations across the enterprise.

Preparing for Upgrading from Liferay DXP 7.x to 7.4

Migrating from Liferay DXP 7.x to Liferay DXP 7.4 requires careful planning and preparation to ensure a smooth transition. Before diving into the upgradation process, let’s focus on critical housekeeping tasks to clean up and organize your portal data. This preparation not only simplifies upgradation but also enhances the performance of your portal in Liferay DXP. Just mentioning: We can always help you with our Liferay Upgrade Services to cut off the hassle. Okay, let’s begin

1. Clean Up Unused Data and Objects

To streamline the migration and improve the efficiency of your portal post-migration, start by removing unused or obsolete objects, including:

  • Unused layouts
  • Inactive users
  • Outdated documents

Liferay DXP stores multiple versions of web content and documents each time an update is made. For example:

  • Version 1.0: Original version
  • Version 1.1: First edit
  • Version 1.2: Second edit
  • Version 1.3: Latest version

Instead of migrating to all these versions, focus on retaining only the most recent version (e.g., 1.3). This reduces the amount of data being moved, speeding up the migration process and improving system performance.

How to do it?
While manual deletion is possible, using Liferay’s APIs is far more efficient:

  • Web Content API: Identify and delete older versions of web content.
  • Documents API: Clean up outdated document versions programmatically.

With a small piece of custom code, you can automate this process, saving significant time and effort.

2. Resolve Duplicate Structure Field Names

In Liferay DXP, web content structures often have fields with duplicate names, which is allowed. However, Liferay 7.4 enforces stricter rules and requires all field names across structures to be unique. Failure to resolve duplicates can lead to migration failures.

Steps to fix this:

  • Audit your web content structures (e.g., text fields, images, checkboxes).
  • Identify fields with duplicate names.
  • Rename these fields to ensure uniqueness across all structures.

For example, instead of having multiple fields named “Title”, rename them to something like “Article_Title”, “Event_Title”, or “News_Title” based on the content type.

3. Prepare for Database Migration

Liferay DXP relies on a database schema that may differ from 7.x. Ensure your database is optimized by performing the following:

  • Remove outdated or unused database entries.
  • Backup your current database to prevent data loss during migration.
  • Validate database compatibility with Liferay DXP.

Liferay provides tools like the Upgrade Tool and the Database Upgrade Wizard to assist with schema updates during the migration process.

Complete Step-by-Step Guide for Upgrading Database to Liferay DXP 7.4

Upgrading your Liferay DXP database to the latest version ensures compatibility, enhanced performance, and access to new features. In this guide, we provide a step-by-step process to make the transition seamless and error-free.

Step 1: Database Preparation and Migration

1. Access MySQL Command Line

Access the MySQL command line interface to connect to your database.

mysql -u root -p

2. Verify Existing Databases

Check the list of existing databases to confirm the current setup.

show databases;

3. Create a Blank Database for Migration

Create a blank database in UTF-8 encoding to ensure compatibility with Liferay.

CREATE DATABASE database_name CHARACTER SET utf8 COLLATE utf8_general_ci;

4. Create a database dump

Create a database dump from the current database into a file.

mysql dump -uroot -p1 database_name > lr_migration.sql

5. Import Database Dump

Import the database dump from the source system into the newly created database.

mysql -u root -p database_name < lr_migration.sql

6. Clean Up DDMStructureLayout Records

Run the following query to identify and remove invalid records from the DDMStructureLayout table.

select structureLayoutId from DDMStructureLayout where groupId not in (select groupId from Group_);

Delete any invalid IDs found to avoid migration errors

Click here to know the reason for deleting records from ddmstructurelayout table.

Step 2: Setting Up Liferay DXP 7.4 Server

1. Install Required Software

2. Backup and Prepare Data Folder

Take a backup of the existing data folder and copy it to the new Liferay instance.

cp -r {liferay.home}/data {backup_location}/data_backup

cp -r {liferay.home}/data {new_liferay_home}/data

3. Clean Temporary Files

Remove old logs, cached files, and OSGi state data.

rm -rf {liferay.home}/tomcat/logs

rm -rf {liferay.home}/tomcat/work

rm -rf {liferay.home}/osgi/state

4. Remove License Folder

Delete any outdated license files to prevent conflicts.

rm -rf {liferay.home}/data/license

5. Disable Indexer and AutoUpgrade

To prevent reindexing content and performance issues during the upgrade, create the following configuration file:

  • Add a file at{liferay.home}/osgi/configs/com.liferay.portal.search.configuration.IndexStatusManagerConfiguration.config with:indexReadOnly=true
  • Add another file at{liferay.home}/osgi/configs/com.liferay.portal.upgrade.internal.configuration.ReleaseManagerConfiguration.config with:autoUpgrade=false

6. Configure App Server Properties

Edit {liferay.home}/tools/portal-tools-db-upgrade-client/app-server.propertiesto define paths and server details.


dir=../../tomcat
extra.lib.dirs=/bin
global.lib.dir=/lib
portal.dir=/webapps/ROOT
server.detector.server.id=tomcat

 

7. Configure Database Connection

Specify the database connection details in {liferay.home}/tools/portal-tools-db-upgrade-client/portal-upgrade-database.properties:


jdbc.default.driverClassName=com.mysql.cj.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/database_name?characterEncoding=UTF-8&serverTimezone=GMT
jdbc.default.username=your username
jdbc.default.password=your password

 

8. Set Upgrade Properties

Enable upgrade reporting in {liferay.home}/tools/portal-tools-db-upgrade-client/portal-upgrade-ext.properties


liferay.home=/path/to/liferay-dxp
upgrade.report.enabled=true

 

9. Optimize Memory Settings

Enhance server performance by configuring memory settings in setenv.sh|bat:


CATALINA_OPTS="-Xms16G -Xmx16G -XX:MaxNewSize=3g -XX:MetaspaceSize=2g"

 

10. JNDI Configuration (Optional)

Edit {liferay.home}/tomcat/conf/Catalina/localhost/ROOT.xml for JNDI data source settings:


<Resource name="jdbc/LiferayPool"
factory="com.zaxxer.hikari.HikariJNDIFactory"
jdbcUrl="jdbc:mysql://localhost:3306/bviplutouatupgradev3_db"
driverClassName="com.mysql.cj.jdbc.Driver"
username="root" password="root"
maxLifetime="0" maximumPoolSize="100" />

 

11. Add MySQL Connector

Download and copy the MySQL JAR file to {liferay.home}/tomcat/lib.

12. Create Portal-Ext.Properties File

Place the portal-ext.properties file in {liferay.home} with additional configurations as needed.

Step 3: Running the Database Upgrade Tool

1. Launch Upgrade Client

Execute the upgrade client tool to start the database upgrade.


cd {liferay.home}/tools/portal-tools-db-upgrade-client
./db_upgrade_client.sh

 

2. Monitor Upgrade Process

Track the start and end times of the process to ensure it is completed successfully.

3. Resolve Migration Stalls

If migration halts, access Gogo shell to resolve issues:


upgrade:execute com.liferay.fragment.service
verify:executeAll
exit
./db_upgrade_client.sh

 

4. Review Upgrade Reports

Find upgrade reports in the following location:


{liferay.home}/tools/portal-tools-db-upgrade-client/reports/upgrade_report.info

 

Example Output:

Type: major

Result: success

Status: There are no pending upgrades

5. Check Logs

Analyze logs for errors or warnings during the process:


{liferay.home}/tools/portal-tools-db-upgrade-client/logs/upgrade.log

 

Key Log Message:

Major upgrade finished with result success

Step 4: Enabling Indexer

After completing the upgrade, enable the indexer to re-enable indexing functionality. Modify the file {liferay.home}/osgi/configs/com.liferay.portal.search.configuration.IndexStatusManagerConfiguration.config with the following content:


indexReadOnly=false

 

The database migration to Liferay 7.4 is complete.

Complete Step-by-Step Guide for Upgrading Code to Liferay 7.4 Using Liferay Developer Studio IDE

Liferay Developer Studio provides a streamlined way to upgrade your codebase to newer versions of Liferay. In this guide, we will walk through the process of upgrading your Liferay project to version 7.4 using the built-in “Liferay Upgrade Plan” feature.

1. Update & Launch Liferay Developer Studio

  • Update your Java Development Kit (JDK) to match the requirements of Liferay 7.4.
  • Update your IDE to the latest version of Liferay Developer Studio. Download

Screenshot of the IDE download page:

blog_liferay_upgrade_7_x_to_7_4_developer_studio

Ensure you have the Liferay Developer Studio installed and configured properly. Open the workspace containing the project you want to upgrade.

2. Open the New Liferay Upgrade Plan Wizard

  • Navigate to the Project menu on the top navigation bar.
  • Select New Liferay Upgrade Plan from the dropdown menu.

Refer to the screenshot below for the exact menu location:

blog_liferay_upgrade_7_x_to_7_4_plan_wizard

3. Configure the Upgrade Plan

When you click on New Liferay Upgrade Plan, a dialog box will open. Follow these steps:

  • 1. Name: Provide a descriptive name for the upgrade plan (e.g., ‘Liferay 7.1 to 7.4 Upgrade’).
  • 2. Upgrade Plan Outline: Select the appropriate outline (e.g., ‘code-upgrade’).
  • 3. Current Liferay Version: Choose the version you are upgrading from (e.g., 7.1).
  • 4. Target Liferay Version: Choose the target version (e.g., 7.4).

Screenshot of the configuration popup:

blog_liferay_upgrade_7_x_to_7_4_upgrade_plan

Click Finish to proceed.

4. Explore the Upgrade Plan Perspective

After clicking Finish, a new perspective dedicated to the upgrade plan will open. This perspective includes:

  • Liferay Upgrade Plan Panel: Lists the tasks required to complete the upgrade process.
  • Console and Progress Panels: Displays logs and progress updates.

Screenshot of the upgrade perspective:

blog_liferay_upgrade_7_x_to_7_4_upgrade_plan_perspective

5. Follow the Upgrade Steps

Work through each step in the upgrade plan sequentially. Below is a detailed explanation of each step:

Step 1: Setup Your Development Environment

  • Create a new Liferay Workspace or Import your existing project into a workspace structure.
  • Configure workspace product key.
  • Initialize server bundle.
  • Migrate .cfg files to .config files.

Step 2: Migrate Plugins SDK Projects

  • Import existing Plugins SDK projects into the Liferay Workspace.
  • Use the migration tool provided in the Liferay Upgrade Plan to assist in this conversion.

Step 3: Upgrade Build Dependencies

  • Open the build.gradle or pom.xml files.
  • Replace deprecated dependencies with the latest versions supported by Liferay 7.4.
  • Update repository URLs if required.
  • Remove dependency versions to align with the latest Liferay standards.
  • Switch to using release.api dependency.

Step 4: Fix Upgrade Problems

  • Analyze warnings and errors listed in the Liferay Upgrade Problems tab.
  • Use the Auto Fix feature to resolve common issues automatically.
  • For complex issues, review the code manually and replace deprecated APIs with supported alternatives.

Step 5: Upgrade Service Builder Services

  • Update the service.xml file to match Liferay 7.4 standards.
  • Rebuild the services using Service Builder.
  • Replace any deprecated methods in the generated service classes

Manual Service Builder Creation and Code Transfer

Instead of migrating the existing Service Builder, you can create a new Service Builder in Liferay

7.4. Copy all entities from the old service.xml into the new service.xml, then run the buildService command to generate the required service classes. Afterward, manually implement custom methods and finders into the *Impl classes to ensure compatibility with Liferay 7.4.

Step 6: Upgrade Customization Plugins

  • Update custom Java classes to replace deprecated methods and frameworks.
  • Validate any overridden JSP files for compatibility with new tag libraries.
  • Adjust configurations in portal-ext.properties or portal-setup-wizard.properties as needed.

Step 7: Upgrade Themes

  • If you have custom themes, migrate them using the Liferay Theme Generator.
  • Ensure CSS, JavaScript, and template files are compatible with the new version.

Manual Theme Creation and Code Transfer

In some cases, it’s easier to create a theme from scratch in Liferay 7.4 and apply appropriate styling from 7.x, given the changes between versions. While not an automatic process, this approach can be more efficient than migrating complex themes directly.

Step 8: Upgrade Layout Templates

  • Update layout templates to follow the FreeMarker or Velocity standards supported by Liferay 7.4.

You can manually create new layouts, copy and paste the existing code, and adjust the FTL templates to ensure consistency and compatibility with the new version.

Step 9: Upgrade Frameworks and Features

  • Review all third-party frameworks and libraries in use.
  • Replace deprecated frameworks with their supported versions.

Step 10: Upgrade Portlets

  • Migrate Generic, Liferay MVC, JSF and Servlet based portlets to the OSGi module framework, if not already done.
  • Update Java and JSP files to replace deprecated methods and APIs.

Step 11: Upgrade Web Plugins

  • Use the Liferay Upgrade Planner to adapt the plugin to the new DXP version’s API. Many issues are autocorrected in the “Fix Upgrade Problems” step, while the planner helps identify remaining issues and suggests code adaptations.
  • Resolve dependencies.

Step 12: Upgrade Ext Plugins

  • Migrate EXT plugins to the new OSGi module structure.
  • EXT plugins modify core Liferay DXP files, posing compatibility risks

7. Test the Upgrade

Once all upgrade tasks are completed, test the project thoroughly:

  • Deploy the modules to a Liferay 7.4 server.
  • Verify that the features work as expected.
  • Check logs for any errors or warnings.

Upgrading to Liferay 7.4 using the Liferay Developer Studio simplifies the process with its dedicated Upgrade Plan feature. By following this guide, you can efficiently migrate to your codebase while minimizing downtime and compatibility issues. Always ensure to back up your project before starting the upgrade and test thoroughly at each stage.

Should You Upgrade to Liferay DXP 7.4?

If you are considering an upgrade from Liferay 7.x to Liferay DXP 7.4, the answer is a resounding yes; especially if you’re looking to enhance operational efficiency, deliver superior digital experiences, and streamline your business processes. Here’s a breakdown of how Liferay migration services from any Liferay 7.x to Liferay DXP 7.4 can elevate your organization:

1. Empower Decision-Making with Data-Driven Insights

Liferay DXP 7.4 makes leveraging analytics easier than ever:

  • A/B Testing: Experiment with any page elements, not just buttons, to optimize user engagement.
  • Content Audit: Simplify content management with advanced filtering options for content lists.
  • Content Performance Metrics: Access metrics for organic and paid search performance across Content, Widget, and Display Pages.

2. Deliver Richer Digital Experiences

Creating engaging and dynamic user experiences is effortless with:

  • Asset Libraries: Utilize Display Page Templates to enrich asset presentation.
  • Draft and Duplicate Content: Create variations seamlessly without disrupting existing content.
  • Enhanced Navigation Menus: Add Display Pages directly as navigation items, streamlining content discovery.

3. Transform Your B2B Buying Journey

Liferay DXP 7.4 is designed to simplify and enhance B2B commerce processes:

  • Flexible Pricing and Discounts: Easily update and manage pricing structures.
  • Visual Organization Widgets: Represent organizational structures visually for clarity.
  • Optimized Product Displays: Show product images in appropriately scaled sizes to improve the shopping experience.

4. Leverage Low-Code/No-Code Capabilities

Empower business users and reduce dependency on developers with:

  • Adaptive Image Sizing: Automatically adjust images in Content and Display Pages.
  • Collection Display Fragment Enhancements: Filter, search, and sort collections with ease.
  • Forms Improvements: Utilize new field types and additional properties to capture data effectively.
  • Liferay Objects: Create custom business objects directly through the UI for tailored business processes.

5. Achieve Cost-Effective Deployment and Maintenance

Cut costs and streamline your operations with features like:

  • Staging in Asset Libraries: Simplify content organization with reduced effort.
  • Expiration Dates for Content: Manage documents and media more precisely.
  • Improved Theme Architecture: Reduce CSS footprint, enhancing page load times.
  • Liferay Enterprise Search (LES): Gain access to powerful search capabilities included for all DXP subscribers.
  • Smarter Site Template Propagation: Achieve better performance and flexibility i`n site management.

6. Build an Interconnected Enterprise Ecosystem

Liferay DXP 7.4 supports seamless integration across enterprise systems with:

  • Commerce Account Integration: Extend Liferay Commerce accounts to non-commerce scenarios.
  • Click-to-Chat Integrations: Enable real-time communication with third-party chat platforms.
  • Enhanced API Access: Use headless RESTful APIs for flexible system integrations.
  • Multi-Factor Authentication (MFA): Strengthen security for online services.
  • Remote App Integration: Register remote JavaScript files as web components for external apps.

Liferay DXP 7.4 offers a robust suite of features that cater to modern enterprise needs; whether it’s delivering superior digital experiences, optimizing costs, or enhancing security. If these upgrades align with your organization’s goals, migrating to 7.4 is surely a strategic move forward.

Where Can Aixtor Help

In case you don’t want the long process to upgrade to Liferay 7.4 and still want to enjoy its robust features; we are here for you. Aixtor’s Liferay upgrade service can help your business to thrive in the latest version of Liferay. Additionally, we have a force of experienced certified Liferay developers that can deliver the desired results for you. Contact us today to get a free consultation.