Question

When Local Live staging is enabled for a site, a clone of the site is created
containing copies of all of the site’s existing pages. 
  1. I want to know what 'cloning' technically means in Liferay's terminology?
  2. Are there any changes to Database? In the sense, will there be separate tables, indexes etc created in DB for Live and clone site separately?
Was it helpful?

Solution

No, there are no changes to the underlying structure of the database.

You already know what a site is (essentially, a collection of pages and entitites): well, a site is internally a "group" (in other words, a site is a "specialization" of a group), and every group has its own row in the Group_ table, where the primary key is the column groupId. If you already built some Liferay plugins, I'm sure you already know what I'm talking about :-)

Well, when you activate staging for a site, a new group gets created: the "clone of the site" is just a new group with a special meaning (sorry if I'm oversimplifying!). Pages and entities are then copied from the original site through a LAR export/import process. This means that rows in the entities' tables (BlogsEntry, BookmarksEntry, DLFileEntry and so on) will be duplicated as well, and these new rows will point to the new group: they will have the new groupId as their value for the column groupId.

The two groups ("live" and "staging") are separated, and when you publish the staging site, its content is exported in a LAR file and then imported back in the live site.

Hope it's useful, tell me if you need some more info :-)

OTHER TIPS

Once the staging group is created, you can update the staging group any time. This feature is called Copy from Live. That is, copy all pages from the live group to the staging. For instance, the Book Street (Staging) staging group was created based on the Book Street live group. Then we just work on the Book Street (Staging) staging group. In the middle of updating the staging group, we may need to roll back to the live group. In such a case, we can use the Copy from Live feature—copying all pages from the live group to the staging group. Thus, we can make the Book Street (Staging) staging group synchronized with the Book Street live group.

Once the staging group updates are ready, you can publish all the pages of the staging to the live group. This feature is called Publish to Live. That is, copy all pages from the staging group to the live group. For instance, the Book Street (Staging) staging group is ready and we want to apply all changes of the staging group to the Book Street live group. In this case, we can use the Publish to Live feature—copying all pages from the staging group to the live group. Thus, we can make the Book Street live group synchronized with the Book Street (Staging) staging group.

In short, the approach of staging and publishing web content locally would be a good idea when the website is small and the loading traffic is a minor concern—the processes of content management and publishing can share the same portal instance. A feature, called local staging and publishing, would be useful for intranets. As a content creator, you can manipulate a working copy and preview it as if it was the website to work on a working copy at any time without disrupting the live pages.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top