Sites

Exporting/Importing Data with LAR Files

Liferay 2026.Q1+

You can use Liferay Archive (LAR) files to transfer data between Liferay environments, including pages, widgets, or instance-wide data (such as roles or, starting with Liferay DXP 2026.Q3+, user groups).

The export and import tools are available on the site or instance level. Site or instance scoped data must be imported using the same scope in the target environment.

Tip

You can also use Site Initializers to create sites pre-populated with pages and content. Site Initializers are client extensions, and developers creating client extensions must understand Liferay’s database and systems to implement them.

LAR File Usage

LAR files are version-dependent, but you can export and import them into any Liferay instance of the same version.

You can use site-scoped LARs to restore a site, but you must delete the site entirely and then create a new site with the same name to import the LAR. This avoids potential data conflicts between content that exists both in the LAR and in the site.

LAR files are not stored permanently in the system. After an export or import process completes, Liferay deletes the entry on the Export or Import screen after 30 days, regardless of the outcome (successful, canceled, or failed). After an export process, the LAR file is downloadable (temporarily stored in the Documents and Media Library) for 30 days.

Important

Exporting LARs is not a backup solution; it’s intended for migrating data between environments. See Backing up a Liferay Portal Installation to learn about backing up your Liferay installation.

Exporting Data

You can export data at two scopes: instance and site.

If your site content references instance-level data (e.g., global categories or page templates), you must import that data in a separate, instance-level LAR file before importing the site data. Data exported in an instance LAR can only be imported at the instance level to another Liferay instance with the same version.

If you plan to export site-level data, begin by identifying any instance-level dependencies. If your site is based on a site template or the content references any instance-level data (e.g., global categories), you must export these at the instance level.

Export instance-scoped LAR files via the Applications menu (Applications), under Export.

Access the Export menu for instance-level data in the Applications menu.

Data exported in a site LAR can only be imported to another site on the same version of Liferay that already has any instance-level dependencies.

Note

Starting in Liferay DXP 2026.Q1, navigation menus are included in site-level export and import.

Export site-scoped LAR files via the site menu, under Publishing → Export.

Access the Export menu for site data in the site menu.

Configuring the Export

  1. On the Export page (site-level or instance-level), click New to create a new export process.

    This opens an export template. If the LPD-57655 feature flag is enabled, clicking New opens a single form instead. See Configuring Exports with LPD-57655 Enabled.

  2. Configure the export process by selecting what you want to export under Pages and Content.

    The type of export determines what kinds of data can be selected.

    Site-level and instance-level exports allow for exporting different types of data.

    Warning

    Exporting page templates can increase export durations by including pages that use them. To improve export durations, uncheck Page Templates under Content → Pages.

  3. Under Content, configure whether to export all data for the selected applications or to filter included application data by date or time.

  4. Under Permissions, determine whether to include permissions for all of the applicable applications in the export.

  5. Click Export to begin the export process.

  6. Once finished, click Download (Download) on the list of export processes to download the generated LAR file.

Download the generated LAR file from the list of export processes.

You can now import the LAR to another site or instance (depending on the export’s scope).

Important

The generated LAR includes all data selected during export configuration. If this includes private or sensitive information, ensure the LAR file is stored in a secure location.

Configuring Exports with LPD-57655 Enabled

Release Feature

This flow requires the LPD-57655 feature flag, which is disabled by default. Once enabled, clicking New on the Export page opens a single form with two sections, Export Details and Data Selection.

In Data Selection, each entity type is a card that names its item count and the data selected inside it.

  1. On the Export page (site-level or instance-level), click New to create a new export process.

  2. Under Export Details, enter a name for the export.

  3. Under Data Selection, set the permission and deletion options.

    Export Permissions: Check this box to include the permissions assigned for the exported entries.

    Export Individual Deletions: Check this box to export deletions made in the content you’re exporting. The box appears only when there are deletions to export.

  4. Under Filter Content By, choose whether to include all data or filter it by date.

    You can select Show All to include all data, Date Range to restrict the export to the period between the From and To dates, or Modified Last to restrict the export to content modified within a recent interval.

  5. Select the entity types to export.

    Every entity type is selected when the form opens, so you deselect the data you want to leave out. Both this form and the export template list Static Pages and Utility Pages as separate top-level entries.

    To export specific pages rather than all of them, click Select Pages to open the Pages to Export modal and choose pages from the page tree.

  6. Click Export to begin the export process.

  7. Once finished, click Download (Download) on the list of export processes to download the generated LAR file.

Creating Export Templates

If you frequently export data, consider making an export template to store and reuse your export settings.

  1. Navigate to the Export page for the desired scope (site-level or instance-level).

  2. Click Options (Options) at the top of the page, and click Export Templates.

    Click the Actions button in the Application Bar and select Export Templates.

  3. Click New.

  4. Name and configure the export template.

  5. Click Save.

You can now select your template when creating a new export process. The template is only usable when starting an export with the same scope.

Importing Data with a LAR File

If the LAR file contains object data, the target Liferay instance must have the corresponding object definitions already. Import them separately before you import the LAR.

When you import a LAR file, some naming conflicts are handled automatically. For example, if you import a site-scoped LAR including a page with the same friendly URL as your target site, the imported page appends a number to the friendly URL (counting up until the conflict is resolved). This same strategy applies to category names.

Other kinds of errors that can’t be resolved automatically may not prevent the import from completing, depending on the application.

If an import that included errors completes, click View Report Entries on the import process to see the details for each error. Use the search bar to search for specific error messages.

You can view, search, or export error report entries for failed imports.

Alternatively, click Export Report Entries to export and download a .csv file (in a .zip archive) with the error details in a format you can read as a spreadsheet (e.g., via Google Sheets).

You can export your error details as a CSV file to read them as a spreadsheet.

Click an entry in the list to see its details, including a full stack trace of the error (by clicking View Stack Trace).

Click an entry to see all the information about each reported error in your LAR import.

Note

View Report Entries and Export Report Entries appear on any finished import process whose status is not successful, which includes a canceled process as well as one that failed or completed with errors. With the LPD-57655 feature flag enabled, the import process list offers View Report Entries only, and only for a process that failed or completed with errors.

Importing Instance Data

Import an instance-level LAR file containing any dependencies before importing site LAR files that reference them.

Import instance-scoped LAR files via the Applications menu (Applications), under Import.

Access the Import menu for instance-level data in the Applications menu.

Importing Site Data

Once you’ve finished importing any referenced instance-level data, import your site-scoped LAR file via the site menu, under Publishing → Import.

Access the Import menu for site data in the site menu.

Configuring the LAR Import

  1. On the Import page (site-level or instance-level), click New to create a new import process.

    If the LPD-57655 feature flag is enabled, clicking New opens a three-step wizard instead. See Configuring Imports with LPD-57655 Enabled for details.

  2. Select the desired LAR file and click Continue.

  3. (Site-level only) Under Pages, select Public Pages or Private Pages to set the type for the imported pages.

    The options appear when the target site has private pages enabled.

  4. Deselect any applications with data you don’t want imported.

  5. Under Deletions, configure whether to replicate or ignore individual deletions for the applications included in the import.

  6. Under Permissions, configure whether to assign the same permissions to the included entities in the target site or instance.

  7. (Site-level only) Under Update Data, choose an import strategy: Mirror, Mirror with overwriting, or Copy as New.

    Copy as New is deprecated. It appears while the feature.flag.LPD-44307 feature flag is enabled, which is its default.

    Note

    You can only import entities using the batch framework with the Mirror import strategy, so this option only affects other types of entities. If your import includes both, warning messages appear when you select Mirror with overwriting and when you finalize the import.

    Importing batch-supported entities always uses the Mirror import strategy regardless of your selection.

  8. Under Authorship of the Content, choose whether to keep the original authorship of imported content or to import content with your user treated as the author.

    Configure the import before you begin a new import process.

  9. Click Import to begin the import process.

Once finished, the applications you selected are imported into the target site or instance.

Configuring Imports with LPD-57655 Enabled

Release Feature

This flow requires the LPD-57655 feature flag, which is disabled by default. Once enabled, clicking New on the Import page opens a three-step wizard: Setup, Data Selection, and Settings.

Important

In this flow, imported pages keep the type they were exported with. The private-layout property in the LAR file’s manifest.xml determines whether each page is public or private, and the wizard doesn’t offer that choice. The default flow offers it under Pages.

A progress bar tracks the three steps, and Data Selection opens with a File Summary giving the export date, author, and size of the uploaded LAR file.

  1. On the Import page (site-level or instance-level), click New to create a new import process.

  2. On the Setup step, enter a name for the import process and upload the LAR file.

    If you upload a file while the Name field is empty, the field takes the file name minus its .lar extension.

    The default upload file size is 104857600 bytes (100 MB), but you can configure the Overall Maximum Upload Request Size setting under Control Panel → System Settings → Infrastructure → Upload Servlet Request.

  3. On the Data Selection step, choose the data to import.

    Import Permissions: Check this box to import the permissions assigned for the exported entries.

    Replicate Selected Deletions: Check this box to replicate the delete operations performed for content types in the target site. The box appears only when the LAR file contains deletions.

  4. On the Settings step, set the authorship and update options.

    Authorship of the Content:

    OptionEffect
    Use the Original Author (default)Keeps the original author, using the current user when the original isn’t found
    Use the Current User as AuthorMakes the current user the author of all imported content

    Update Data:

    OptionEffect
    Mirror (default)Creates content as new on the first import and keeps a reference to the source, so later imports from the same source update entries instead of creating them
    Mirror with overwritingSame as Mirror, except a document or image with the same name is overwritten
    Important

    Instance imports offer Mirror only. Entities that use the batch framework always import with Mirror. This flow doesn’t offer Copy as New, which remains available in the default flow.

  5. Click Import to begin the import process.

Once finished, the data you selected is imported into the target site or instance.

Configuring Export/Import Processes

Liferay provides settings for configuring export/import processes as well as staging-specific features. These settings affect staging and site template propagation.

SettingDescription
Include All Asset LinksIf checked, all asset links are included from the site within the given date range. If unchecked, only asset links connected to the content are included.
Replicate Individual Deletions by DefaultIf checked, delete operations performed for content types are always replicated in the target site by default.
Publish Permissions by DefaultIf checked, permissions assigned for exported pages and individual portlet windows are always included by default.
Validate File EntriesIf checked, publishing or importing content types with text causes Liferay to check the content for links to documents and ensure they point to valid documents.
Validate Journal Feed ReferencesIf checked, publishing or importing content types with text causes Liferay to check the content for references to web content feeds and ensure they point to valid feeds.
Validate Layout ReferencesIf checked, publishing or importing content types with text causes Liferay to check the content for links to one of the portal’s virtual hosts and ensure they point to a valid Liferay page. Uncheck this if your virtual host has pages outside Liferay.
Validate Missing ReferencesIf checked, publishing and import processes cause Liferay to check for missing references. If unchecked, missing reference validation is skipped. As a result, references without existing targets can be published or imported to the target site.