Loading Audio...
Managing Changes Across Servers with Staging
Liferay Staging provides a shared working environment for preparing content and site changes before they go live. While Publications is generally recommended for most content governance needs, Staging offers a unique capability: Remote Live Staging, which supports physically separating your working and live environments on different servers. This specific feature is the primary reason why an organization might choose Staging over Publications. This article delves into how you can leverage Staging effectively, though it primarily focuses on remote Staging.
Understanding Staging Environments
When enabled for a site or asset library, Staging creates a separate copy of the original. This copy serves as your working environment. You can host your environments in one of two ways:
- Local Live Staging: The working and live environments reside on the same Liferay server. This setup is generally simpler and faster for publishing, as data transfer is local.
- Remote Live Staging: The working and live environments are hosted on physically separate Liferay servers. This is crucial for organizations with strict regulatory or security requirements that mandate content is prepared in isolation from their public-facing systems.
Regardless of the hosting approach, the fundamental publishing process remains the same. This process executes in three sequential phases: export, validation, and import.
During the export phase, Liferay processes the publish configuration, gathers all referenced entities, and consolidates them into Liferay Archive (LAR) files. These files are version-dependent and contain all exported data in a Liferay-specific format. Once created, the file is stored locally or transferred to the remote live DXP server.
The validation phase checks if the import process can begin. It verifies file versions, integrity, system information (e.g., language settings), and ensures there are no missing content references. If validation fails, Liferay typically reverts the site or asset library database to its original state. However, physically stored document library files may not revert, potentially causing data discrepancies. Hence it’s important to maintain backups.
In the import phase, Liferay applies necessary updates or additions to the site’s content, layouts, and applications based on the publishing configuration. If all checks pass, the staged content is applied to the live environment. After publication, a reindex process occurs in the live environment, consuming time and resources. This entire process happens while both environments are actively serving user requests. Keep in mind that larger LAR files means longer import times, especially for Remote Staging.
Setting Up Remote Live Staging
Setting up Remote Live Staging requires careful planning and coordination, since it involves configuring two distinct Liferay server environments. To ensure a smooth and successful implementation, consider these best practices:
- Enable Early: It is highly recommended to enable Staging early in your project's development cycle, ideally on new or clean sites. Enabling Staging on a site with a large amount of existing content can lead to errors and prolonged setup times, as it involves copying all existing data to the staged environment.
- Server Configuration: Ensure both the staging and remote live Liferay servers are properly configured to communicate. This often involves network setup (e.g., firewall rules, IP addresses) and specific Liferay properties to allow secure transfer of data between the two environments.
- User Synchronization: Users who publish from the staged environment to the remote live environment must have identical credentials and permissions on both servers. Implementing a user synchronization strategy is essential for seamless publishing.
- Content Scope: Understand that changes in Staging are scoped to individual sites or asset libraries. If you plan to stage content across multiple sites or asset libraries that are also remotely staged, ensure proper configuration and dependencies are managed to avoid issues during publishing.
- Carefully Select Application Data: During setup, carefully consider the specific application data you want to stage. This ensures that only relevant data is managed in the staged environment, optimizing performance and avoiding unnecessary data transfers.
Adhering to these best practices can help minimize setup issues and improve your Staging experience. See Configuring Remote Live Staging for more information.
Making and Publishing Changes
When staging active, Liferay significantly restricts direct editing capabilities on the live environment. For instance, you cannot edit pages or staged application data in the live environment. Instead, you can only edit it within the staging environment. This helps ensure all changes go through your content management process. If you do edit unstaged applications in either environment, the changes are automatically synced. This helps keep your environments up-to-date and ensures the staged environment provides a complete and accurate preview of what your changes will look like.
After making changes within staged applications, you can publish them manually or schedule them for publishing at a later time. When publishing content manually, you have two different methods:
- Single Assets and Widgets: This method enables direct and faster publishing for individual content items or widgets, rather than transferring all content at once.
- Publishing All Content: This transfers all selected changes made in the staged environment to the live environment.
For both scheduled and manual processes, Staging provides a publishing wizard with detailed configuration options. These options control the content, pages, and permissions included in the release. See Site Staging UI Reference for more information on each configuration option.
Best Practices for Publishing
Defining a robust publishing strategy for Staging is crucial to avoid issues. Consider these best practices:
- Publish Frequently and in Small Blocks: To minimize publishing times and reduce the likelihood of conflicts, publish changes frequently and in smaller, incremental blocks rather than infrequent, large updates. This also makes the process more performant.
- Manage Permissions: Carefully manage permissions for users who have access to publish from staging to live.
- Monitor Publishing: Be aware of potential network delays or resource consumption during the publishing process, especially with Remote Live Staging or when transferring large amounts of data.
- Plan Hardware Environment: For large content volumes, especially many large images or videos, ensure your hardware environment (network, storage) is adequately resourced.
- Understand Data Handling: If Documents and Media are part of the changes, be aware that physically stored files may not revert automatically if an issue occurs during publishing, potentially causing discrepancies. Regular backups of both database and file system are crucial.
- Handle Page Deletions Carefully: When using the "Delete Missing Pages" option, exercise caution. This option deletes any page that is not selected in the publishing process configuration. You must select all the pages you want to keep.
- Interpret Error Messages: Be aware that some error messages during publishing may not be immediately clear to non-technical users and might require checking server logs for detailed troubleshooting.
Adhering to these best practices can help ensure a smooth publishing process.
Conclusion
Liferay Staging provides a powerful solution for managing content and site changes within a controlled working environment. Remote Live Staging also supports hosting your environments on physically separate servers. Leveraging Staging effectively ensures a secure, compliant, and well-governed content publishing process.
Next you’ll review what you’ve learned before moving on to the next module.
Capabilities
Product
Education
Knowledge Base
Contact Us