In the last year since the release of Liferay DXP 7.3, multiple customers have asked us about our recommended approach on Liferay Publishing. The introduction of the new Publications feature means that Liferay DXP 7.3+ customers now have two options when it comes to content publishing – the older Liferay Staging feature that we love and hate, and this new Liferay Publications feature.
But before I get started with the pros and cons of Liferay Publications versus Liferay Staging, let me level-set the playing field by providing quick overviews of each.
Liferay Staging Overview
As covered in Liferay’s documentation, Liferay’s Staging application provides a working environment for making changes to a Liferay site, its pages, web content, documents, and more before publishing your changes to your live environment. With it, you can modify staged application data and Pages behind the scenes and then publish your changes when ready, whether individually or altogether, while the Live environment handles incoming user traffic.
Liferay Staging provides two high-level options –
- Local Staging where you host the staged site or asset library in the same Liferay environment where the live site lives.
- Remote Staging where the staged site or asset library sits in a separate Liferay environment (typically called Staging or Authoring) and the staged content is published to the live site in a separate Liferay environment (production).
Additionally, Liferay Staging gives you a full slew of features that you can read about in the Liferay documentation.
Liferay Publications Overview
Publications is a new Liferay DXP 7.3 feature that enables content authors to create/edit content, possibly have those changes go through a content approval workflow, and publish them to the live site on a schedule. A publication is essentially a change set that groups a bunch of related changes together and publishes them all at once.
Multiple Publications can be worked on at a time by multiple authors with some or all publications being shared between multiple content authors and editors. This allows different teams to work on different content changes that can go live on their own schedule. A couple of key differentiators of Publications versus Staging are that a Publication can span multiple sites (Staging cannot) while Staging allows you to move content across Liferay environments (Publications cannot).
Liferay Publications Versus Liferay Staging
With the background information out of the way, let’s dive into the heart of the article—the tradeoffs between going with Liferay Publications (only available in Liferay DXP 7.3 and later) versus Liferay Staging.
Liferay Publications Pros and Cons
Liferay Publications offer the following pros:
- This is the go-forward approach for Liferay publishing and the Liferay engineering team is investing more effort enhancing this feature compared to Liferay Staging.
- Liferay Publications work a bit like Git with support for merges and branches
- Supports multiple parallel publications that can be shared across multiple content authors
- You can publish a single publication at a time and make it live
- A single publication can span multiple sites within a single instance. So, if you have multiple changes that all need to go live at the same time, then you can put them in a single publication and when you publish that publication, all your changes go live together without you having to remember to publish each site individually as you would need to with Liferay Staging.
- If parallel publications include compatible changes, they can be published without issue. In this case, the tracked changes of both publications are applied to production.
Liferay Publications does suffer from the following cons:
- Liferay Publications only supports publishing within a single Liferay environment. In other words, you cannot have a separate content staging/authoring environment from the live production environment. All publications including the live publication exist within the same Liferay environment. I hear that Liferay DXP will support remote publications in the future (possibly even in 7.4 though I would not count on this).
- Liferay Publications only support tracking changes to pages, web content, and documents. If you need publishing control over other types of Liferay assets such as blogs, dynamic data lists, segments, or knowledge base articles, then Liferay Staging may be your only option.
- If production is updated while Content Managers are developing their changes in a publication, this may cause a conflict during the publishing process. If Users attempt to publish a publication that includes changes that are incompatible with the current version of production, they are notified of conflicting changes. These notifications show the cause of each conflict and it can be resolved automatically or manually. This is where the content publisher may need to dig in and understand the cause of the conflict and resolve each conflict manually.
Liferay Staging Pros and Cons
Liferay Staging offers the following pros:
- Liferay Staging has been around since Liferay Portal 6.x and even though it has historically had issues, we have customers running fairly complex staging/publishing scenarios for multiple sites between multiple Liferay test and production environments.
- Liferay Staging allows publishing from staging to multiple target environments including live production and lower test environments whereas Liferay Publications only work within a single Liferay environment.
- Because Liferay Staging works across multiple environments, you can use remote staging, and this allows you to deploy an updated theme in the staging environment and view your content changes in context of your theme updates. You cannot do the same with Liferay Publications since any change to the theme would affect the live production site as well.
- Allows a public site or content item to be viewed in the staging environment without the user having to login; this can be useful in case of a site/content reviewer/approver that doesn’t want to login to Liferay to review/approve site/content changes.
Liferay Staging does suffer from the following cons:
- Liferay Staging will be deprecated in a future version of Liferay though Liferay has not provided a specific release when this will happen.
- When you have multiple changes in multiple sites that all need to go live at the same time and if they have any site-level dependencies, then you have to remember to publish each site individually in the right order; for example, Global typically needs to be published before any other sites.
In Closing: Liferay Publications Versus Liferay Staging
As with most things in life, you don’t have a simple black and white answer to whether you should stick with Liferay Staging or switch to the new Liferay Publications. You need to examine the list of trade-offs and determine what makes the most sense in your scenario.