Migrating Liferay to PostgreSQL: A More Reliable Alternative to Liferay's Beta Tool
This is LR Tools’ write-up of a short but useful post by Carlos Durán on Liferay.dev, covering a real gap: Liferay’s own database migration tooling for PostgreSQL is still Beta, and doesn’t always finish the job. We’ve preserved the links to the tool and its documentation that made the original post worth bookmarking.
Why this comes up now
PostgreSQL adoption has been climbing industry-wide, and Liferay itself made the call to replace MySQL with PostgreSQL. That leaves a lot of teams running on-premise Liferay installations facing the same question Liferay already answered internally: how do you actually move an existing installation onto PostgreSQL without losing data along the way?
The official path — and where it falls short
Liferay publishes an official tool for exactly this, split into two parts: a data exporter and a migration script. The catch is that Liferay DXP 2026’s own control panel labels it Beta — and in practice, it isn’t just a formality. Multiple people who tried it, the original author included, didn’t get a clean migration out of it.
A more reliable alternative
In response, Carlos Durán built and published a focused, single-purpose alternative: liferay-db-migrator. Before running it, you need three things in place:
- The tool itself, downloaded from its GitHub releases page
- An empty PostgreSQL database ready to receive the migrated data
- Java 21 installed
The migration procedure
The actual migration is eight steps, alternating between server and database work:
- Create an empty database on a PostgreSQL server
- Stop the Liferay application server
- Change the database connection configuration to point at PostgreSQL
- Start the server again
- Wait for Liferay to finish creating its tables against the new (empty) PostgreSQL schema
- Stop the server again
- Run the migration tool — see its documentation for the exact invocation
- Start the server again
Once that completes, the installation is running on PostgreSQL with the data carried over — no exporter step, no separate migration script to coordinate.
Worth knowing before you run it
This is a community tool, not an official Liferay release, so the usual migration hygiene applies: take a full backup before you start, run it against a staging copy first, and confirm your Liferay and PostgreSQL versions match what the tool has actually been tested against (check the documentation for specifics) before pointing it at anything production.
This article is LR Tools’ write-up of the original post by Carlos Durán — read it on Liferay.dev for the author’s own framing.
This article is adapted from: Carlos Durán, Liferay.dev