Staging in Liferay Portal 6.2

Liferay Support does not recommend or endorse specific third-party products over others. Liferay is not responsible for any instructions herein or referenced regarding these products. Any implementation of these principles is the responsibility of the subscriber.

This article outlines a number of suggested practices for using Liferay Portal's staging feature. Following these principles will help prevent future issues and ensure that your staging environment operates as smoothly as possible.

The following practices should be followed to ensure the best experience while staging in Liferay Portal. The steps fall into five categories:

  1. Pages
  2. Themes
  3. Permissions
  4. Content Management
  5. Administrative



Page Reordering

  1. When reordering pages within a staged site, note that for the changes to be effected into the live site, a "publish all" must occur. Note that in many enterprise environments, the "publish all" feature may take a long amount of time to complete due to the amount of data in the WCM and Document Library portlets.
  2. Because of this, a feasible workaround for many subscribers is simply to publish “All Pages” without publishing any data. That is, publish all pages, while making sure to deselect any portet data or content. This will allow for a quick “Publish All” that reorders the pages in question.
  3. Other ways to avoid the potential slowdown of reordering pages could include breaking large sites into smaller sites or simply changing the page order as little as possible. However, the above method will work in cases where these two options are not feasible.

Pages - Linking to Unpublished Pages

  1. When creating content that references a newly created page, make sure to publish that page before linking to it in the content you are creating.
  2. In remote staging, a new, unpublished page is given a “pseudo-link” which operates as a placeholder until after that page is published


  1. When publishing pages that have custom themes, it is important that the Theme Settings checkbox is checked or the Live page will have the default Liferay theme.
  2. This is because: When selected on export, the theme and color scheme chosen for the site are included in the resulting LAR files. When selected on import, the theme and color scheme settings are imported and all the pages are configured to use them.
  3. There is a known issue where the THEMEID and COLORSCHEMEID are deleted on subsequent publications. See LPS-92943 for more information.


Changing Web Content Permissions in Remote Live

  1. When changing permissions for a web content in local live staging, make sure to “touch” the piece of content to flag it as “modified”. This will ensure that the content (and its permissions) are updated when a publish occurs. Note that this only applies to remote live staging as local live staging does not require the republishing of content to enact permissions change.

Communicate Standard for Using “Live-editable” Portlets

  1. Note that some of the portlets in Liferay allow users to make changes to the live version of the staged portlet.
  2. In order to avoid publication errors, list all of the assets that can be modified in the live site and then clearly communicate to users of the portal where changes should be made (whether in staging or directly in live.
  3. For example, in the calendar portlet, events can be created directly in the live site. Administrators should communicate to all potential event creators where to create their live events (whether in staging or directly in live). If events are created in both the staging site and the live site, future publications will likely fail.

Content Management

Language Coherence

  1. When utilizing multiple languages within a site, make sure to:
    1. Only use languages that have been defined within the site
      • Difficulties arise when the portal encounters content in a locale that is not defined on the site.

      • e.g. If English and Spanish are the defined languages, and you’d like to remove English, make sure to remove all content in English.

        • Even “small changes” Iike from en_US to en_GB) will cause this issue so be careful with the web content that you use on the portal.

    2. Use the same languages across the portal, sites, and content

      • e.g. There should not be a site that utilizes Chinese when the only languages defined for the portal are English and Spanish.

  2. Every language element needs to be exactly the same between the live and staged site. If there are discrepancies between the languages on the two sites, the publish will likely fail.

Use Original Names for Documents

  1. When renaming an entity, make sure to give that entity a name that has not been used in the past to name that same document.
  2. Also, be very careful when renaming a file in the document library as problems may arise from using the name of another file in the document library.

Use the Global Scope When Linking Assets from Multiple Sites

  1. For entities that will be used in multiple sites, make sure to place them in the global scope. Entities like web content, structures, templates, documents, vocabularies and categories, application display templates, and DDLs are not intended to be shared across sites unless those entities belong to the global scope.
  2. As such, publishing to live may not work if there are references to entities that do not belong to that site or the global site.
  3. For more information, please see the corresponding knowledge base article.
  4. Note that the functionality for this may change in Liferay 7.0.


Create a Plan for Maintaining Database-File System Consistency

  1. In the case of a staging failure, a transactional database will be able to revert back to its original state. However, the file system (if it is not “database-stored” like DBStore) is not transactional and therefore will need be rolled back. This could potentially cause a discrepancy between a file and where it is being referenced from.
  2. Because of this, administrators should take great care if they decide to stage the document library, making sure that regular backups of both their database and their file system are being maintained. Administrators should also ensure that it is clear which file system backups will correspond with particular database backups.
  3. Make sure that the same patches are applied to all servers being used in order to avoid possible staging issues. For more information on that please check this Knowledge Base Article.

Changing Settings in Live, Embedded Portlets

  1. Changing preferences in embedded portlets is less straightforward than changing settings for out-of-the-box portlets. The easiest way to avoid issues is simply to push the embedded portlet to live with the understanding that the settings will be static. However, if settings must be altered they may be changed with a script which allows the deleting or changing of the settings directly in the database. This operation will be at the discretion of the administrator.

Vocabulary Management

  1. For environments that utilize both global and local vocabularies, note that global vocabularies must be published to the live site through global site staging. One way to avoid confusion with vocabularies is to simply keep all vocabularies local or global. If both must be utilized, administrators should ensure that publishing changes to the global site is part of the content-editing process.

Additional Information

0 人中有 0 人觉得有帮助