Knowledge Base
Published May 6, 2026

How to Migrate a Liferay PaaS Database from MySQL to PostgreSQL

Written By

Sorin Pop

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Issue

We are planning to migrate our Liferay PaaS database from MySQL to PostgreSQL and need to understand the process, the required steps, and the scope of Liferay Support's involvement.

Environment

  • Liferay PaaS

Resolution

Migrating a Liferay PaaS database from MySQL to PostgreSQL is a complex, manual process that your team must perform directly. While Liferay Support can prepare your target PaaS environment with a new, empty PostgreSQL database, your team (and not Liferay Support) must prepare the data and execute the migration.

Follow these high-level steps to perform the migration:

  1. Take a complete backup of the source Liferay PaaS environment. Stop the environment first to prevent new data from being generated after the backup.
  2. Download the backup archive and extract the MySQL database dump file.
  3. Set up a local MySQL server and import the database dump into it.
  4. Follow the process outlined in Migrating Your Database to PostgreSQL to convert the local MySQL database to a local PostgreSQL database using Liferay's database migration tool. On releases before 2026.Q3, this tool is a beta feature and you may encounter issues.
  5. Export the newly created local PostgreSQL database in a plain-text format. Before you repackage it, confirm that all Liferay tables are in the public schema and that table names use the correct capitalization.
  6. Repackage the modified PostgreSQL database dump along with the original document library files (from the initial backup) into a new PaaS-compatible backup archive.
  7. Coordinate with Liferay Support to have the target PaaS environment's database changed to PostgreSQL. This involves deleting the old MySQL database and creating a new, empty PostgreSQL service.
  8. Once the environment is ready, upload the newly created backup archive and perform a restore.

Additional Information

Due to the potential complexity of migrating to a new database vendor, consider exploring migration assistance through Liferay's Global Services (GS) offerings.

Did this article resolve your issue ?

Knowledge Base