Exporting/Importing Data with LAR Files

Exporting and Importing Complete Sites

Liferay DXP 2026.Q4+ Release Feature

You can copy one or more complete sites, including their public pages, content, and settings, from one Liferay instance to another. Export the sites from the instance-level Export page into a single LAR file, then import that file in the target instance. The import creates each selected site that doesn’t exist in the target instance and updates each one that does. The site-level import, by contrast, imports only into a site that already exists.

This feature requires the Site Export and Import (LPD-85946) feature flag, which depends on the Export/Import UI Revamp (LPD-57655) feature flag. You must enable both in each instance that exports or imports sites. Site selection then appears in the export form and import wizard on the instance-level Export and Import pages. Site-level export and import don’t offer it.

In addition to the feature flags, you must have the Export/Import Pages permission on each site you export or import. If you don’t have this permission on a site, the export skips that site.

Important

Exporting or importing many or large sites can take a long time or fail. Select only the sites you need.

Exporting Sites

Export the sites from the instance that holds them.

  1. Open the Global Menu (Global Menu) → Applications → Export.

  2. Click New.

  3. Under Export Details, enter a Name for the export.

  4. In the Scope section, above Data Selection, click Select Sites.

    The Select Sites dialog opens. It lists the instance’s sites that are eligible for export, with Title, Path, and Child Sites columns.

    The Select Sites dialog lists the instance's sites with their title, path, and child sites.

  5. Search for or browse to the sites to export, check each one, and click Select.

    Selecting a parent site doesn’t include its child sites. Check each child site you want to export.

    The Sites control in the Scope section now names the sites you selected.

    The export form's Scope section names the selected sites above the Data Selection section.

  6. Under Data Selection, choose the instance entity types to export along with the sites.

    Every entity type is selected when the form opens. To export only sites, deselect all of them. To export only instance data, select no sites.

    Export stays disabled while you have no entity type or site selected. If you clear every selection, the form shows “Please select at least one entity type or site to continue.”

    For the other options on this form, see Configuring Exports with LPD-57655 Enabled.

  7. Click Export.

  8. When the export process’s status shows Successful, click Actions (Actions) on it and click Download.

Importing Sites

Import the LAR file in the target instance, where both feature flags must also be enabled.

  1. Open the Global Menu (Global Menu) → Applications → Import and click New.

  2. On the Setup step, enter a Name.

  3. Click Select Files and choose the LAR file.

  4. When the upload shows “Completed…”, click Continue.

  5. On the Data Selection step, click Select Sites in the Scope section.

    The Scope section appears only when the LAR file contains sites. The Select Sites dialog lists the file’s sites with Title, Path, and Exists in Instance columns. Exists in Instance shows which sites are already in the target instance.

    The import wizard's Select Sites dialog lists the LAR file's sites and shows whether each one exists in the instance.

  6. Check the sites to import and click Select.

    The import skips the sites you don’t select.

  7. Select any instance content to import along with the sites, and click Continue.

    Continue stays disabled until you select content or a site. For the other options on this step, see Configuring Imports with LPD-57655 Enabled.

  8. On the Settings step, click Import.

    Update Data offers only Mirror, so sites always import with Mirror. Mirror creates content as new on the first import and updates it on later imports from the same source, instead of creating duplicates.

    When the import process’s status shows Successful, the sites are imported. If the import records errors or warnings, see Import Results.

What a Site Export Includes

Each exported site includes this data:

  • The site’s public pages
  • The content of the site’s applications, such as web content, documents, and object entries
  • The settings, logo, and theme of the site’s public pages

A site export never includes this data:

  • The site’s private pages
  • Permissions
  • Deletions
  • The site’s link to its site template

You can export only active sites. The Select Sites dialog doesn’t offer staged sites.

Import Results

The import matches each site by its external reference code (ERC), the identifier the LAR file records for each site. It creates the selected sites that don’t exist in the target instance and updates the ones that do. It merges each site’s pages with the existing site’s pages and doesn’t delete target pages that the LAR file lacks.

The import also restores each site’s parent site by ERC. When it can’t, it records a warning report entry and doesn’t restore the parent:

WarningCause
“The parent group [parent ERC] for [site name] does not exist in the target instance or in the LAR file.”The parent site isn’t in the target instance and wasn’t among the sites you imported. Select the parent site too.
“Unable to move the group [site name] under its parent group [parent ERC] because the parent group is a child of the group in the target instance.”In the target instance, the parent site is a child of the site.
“Unable to move the group [site name] under its parent group [parent ERC].”Moving the site under its parent failed for another reason.

If a site can’t be created or imported, the import records an error report entry for it. See Importing Data with a LAR File to view and export report entries.