How To Upgrade To Liferay DXP 7.4 Version: Step-By-Step Guide

blog-banner

Upgrading to Liferay DXP 7.4 involves a series of steps to ensure a smooth transition with minimal downtime and issues. This guide will walk you through the specific steps for upgrading the database, custom modules, and custom themes. Additionally, we'll cover how to test each component to ensure a successful upgrade.

Backup Your Data

Creating Backups:

  • Configuration Files: Backup portal-ext.properties.
  • Database: Ensure a backup of your database.
  • Document Library File System: Backup repositories like Sharepoint, Documentum, Nuxeo.
  • Application Server: Backup the application server for easy restoration.

Validating Backups:

  • Ensure backups are completed and can be restored if needed.

Database Upgrade Steps

Preparation:

  • Ensure your database is backed up.
  • Verify compatibility of the database version with DXP 7.4.

Upgrade Process:

  1. Stop Liferay: Ensure the Liferay server is stopped.
  2. Backup Database: Perform a full backup of your database.
  3. Create Upgrade Database: Create new schema for the upgrade version and import data-dump taken from your current application version.
  4. Run Upgrade Tool: Use the Liferay upgrade tool to upgrade the database schema to 7.4.   Go to the tools/portal-tools-db-upgrade-client folder from root level of Liferay server.   
    Screenshot from 2024-06-26 16-49-18 Screenshot from 2024-06-26 16-50-05
    Now,click on the db_upgrade_client.sh (Linux OS) and db_upgrade_client.bat (Windows OS)
    Screenshot from 2024-06-26 16-50-36.   
    The script may ask you several questions. Here are some common prompts and example responses:
    • Please enter your Liferay home (Your liferay server's root directory path):
      • /home/st25062102/Downloads/liferay-dxp-tomcat-2024.q1.12-1717400515/liferay-dxp
    • Please enter your application server:
      • tomcat
    • Please enter your application server directory:
      • /home/st25062102/Downloads/liferay-dxp-tomcat-2024.q1.12-1717400515/liferay-dxp/tomcat
    • Please enter your extra library directories in application server directory:
      • /bin
    • Please enter your global library directory in application server directory:
      • /lib
    • Please enter your portal directory in application server directory:
      • /webapps/ROOT
    • Please enter your database:
      • mysql
    • Please enter your database JDBC driver class name:
      • com.mysql.cj.jdbc.Driver
    • Please enter your database JDBC driver protocol:
      • jdbc:mysql://
    • Please enter your database host:
      • localhost
    • Please enter your database port:
      • 3306
    • Please enter your database name:
      • upgrade_lportal_74
    • Please enter your database username:
      • root
    • Please enter your database password:
      • root
    Note: These are example responses to the prompts, not actual answers.
  5. Check Logs: Review logs for any errors or warnings.
  6. Verify Data: After the upgrade, verify the integrity of the data.

Post-Upgrade Testing:

  • Ensure all data is accessible and no data corruption occurs.
  • Validate database performance and query responses.

Custom Module Upgrade Steps

Preparation:

  • List all custom modules ordered independently with other modules currently in use.
  • Review release notes for changes in APIs and dependencies.
  • In MVC portlet, don't change the value of portlet-namespace . If we change it'll not automatically map on page.
  • In Service-builder, don't change the value of package-path in service.xml as well as Bundle-SymbolicName in bnd.bnd of service module.

Upgrade Process:

  • Update Dependencies: Update your custom modules to be compatible with Liferay DXP 7.4.
    • Change dependencies in build.gradle .
  • Code Changes: Modify the code to accommodate API changes.
    • Use Liferay's Java Docs and Breaking Changes documentation.
  • Rebuild Modules: Rebuild the modules using the updated SDK.
    • Command: ./gradlew build
  • Deploy Modules: Deploy the updated modules to the Liferay server.
    • Command: ./gradlew deploy

Post-Upgrade Testing:

  • Verify each custom module's functionality.
  • Check for any deprecated API usage or runtime errors.
  • Perform end-to-end testing to ensure modules integrate well with the upgraded platform.

Custom Theme Upgrade Steps

Preparation:

  • Identify custom themes and gather related source files.
  • Review changes in the Liferay theme development framework.

Upgrade Process:

  • Update Theme Dependencies: Update your custom theme to be compatible with DXP 7.4.
    • Update package.json and other configuration files.
    OR
    • We can run the gulp upgrade command from inside theme's folder.
  • Adjust Styles and Templates: Modify CSS, JavaScript, and template files to align with new features and changes in DXP 7.4.
  • Rebuild Theme: Rebuild the theme using Liferay's Theme Generator.
    • Command: gulp build
  • Deploy Theme: Deploy the updated theme to the Liferay server.
    • Command: gulp deploy

Post-Upgrade Testing:

  • Validate the visual appearance and layout of the custom theme.
  • Test responsiveness and compatibility across different devices and browsers.
  • Ensure all theme-specific functionalities work correctly.

Conclusion

By following this comprehensive guide, you can successfully upgrade to Liferay DXP 7.4, ensuring that your environment, custom modules, and themes are all functioning correctly. Proper planning, thorough testing, and leveraging available resources will help you achieve a smooth and efficient upgrade process.

Explore our comprehensive Liferay DXP Upgrade and Migration Services to discover how we can elevate your digital experience today!

Contact us

For Your Business Requirements

Text to Identify Refresh CAPTCHA
Background Image Close Button

2 - 4 October 2024

Hall: 10, Booth: #B8 Brussels, Belgium