Importing a site or objects

After you export a site or objects using the Export site wizard or Export objects wizard, you can import the content using the Import wizard. Before you start the wizard, you need to copy your export packages into the application’s ~/CMSSiteUtils/Import folder.

Importing a site

  1. Open the Sites application.

  2. Click Import site or objects. The Import wizard starts.

  3. Select the package that you want to import.

    • The list contains all packages stored in the ~/CMSSiteUtils/Import folder.
    • You can upload additional packages to the folder by clicking Upload package.
  4. Choose one of the following options once you select a package:

    Option

    Description

    Preselect all items

    Preselects all objects in the package.

    Preselect only new items

    Preselects only objects that do not already exist in the system.

  5. Click Next.

  6. When importing a site package, select one of the following options. The wizard skips this step if you are importing a package containing only global objects.

    Option

    Description

    Import a new site

    A new site will be created based on the contents of the package. You need to enter the site’s display name, code name and domain name.

    Import objects into an existing site

    The wizard imports the content of the package into the selected site.

  7. Click Next.

  8. Select which objects from the package you want to import and configure re-signing of contained macro expressions. To choose objects, switch between the categories displayed in the tree on the left side of the wizard.

    See the Import - Object selection settings section for details about the available options.

    Objects that already exist in the target system are marked with an asterisk (*). If you import an existing object, the new version overwrites the current one.

    Selecting objects for import

  9. Click Next to execute the import process. An import log appears, showing the progress of the import (you can abort the import process at any time by clicking Cancel).

  10. Click Finish.

The system returns you to the Sites application.

Note

Keep in mind that the package does not include the files of the MVC project that handles the presentation of the live site.

You can use the import to transfer the content and objects stored for the site in the Xperience database, but you need to deploy the corresponding MVC project manually (using FTP, the Visual Studio Publish function, or another deployment option).

If the site does not have any system modules assigned in the data of the import package, the import process automatically assigns all available modules to the new site.

Importing packages with files

For packages that contain physical files (global or site files, code files) you need to complete the standard import procedure and then manually perform the following steps to ensure that your web application runs correctly:

  1. Open the solution file (WebApp.sln) in Visual Studio.

  2. Include the new files that did not exist in the project before the import:

    1. Click Show all files at the top of the Solution Explorer.
    2. Locate the newly added files.
    3. Select the files you wish to include one-by-one while holding the Ctrl key.
    4. Right-click one of the files and select Include in Project.
  3. Rebuild the solution.

Importing packages from different Xperience versions

You cannot import packages from newer Xperience versions to older versions (including minor hotfix versions).

The system allows you to import packages from older versions to newer ones, but the support only extends back to the previous major version. For example, only packages from Kentico 12 or Xperience 13 can be imported to Xperience 13. We recommend using the same version for all of your instances whenever possible.

Packages from different versions of Xperience have a different data structure. When importing packages from an older version of Xperience to a newer one, the system attempts to automatically convert the package to the newer format, but certain issues may remain.

  • Importing sites from an older version is not a valid way to perform an upgrade. See Upgrading to Xperience 13 to learn how to properly upgrade your site.
  • Never overwrite any of the system’s default UI templates, which are used by the Xperience interface (you can find a list in Administration interface application on thePage templates tab under the UI templates category).
  • Avoid importing Form control and Web part objects from older packages. This may cause incompatibility problems and errors.
  • When importing sites from older versions, you may need to assign the system’s modules to the site after the import:
    1. Open the Sites application.
    2. Edit the imported site.
    3. Add all required modules on the Assigned objects -> Modules tab.
  • When importing a package from an older version using the web site project format, the import places all physical files from the imported package into the ~/App_Data/CMSTemp/ImportExport/Files folder (or a different folder if your application has the CMSTemporaryFilesFolderPath web.config key set to a custom folder). Perform the following steps:
    1. Copy the content of the folder into the CMS folder of your administration project.
    2. Include any new files into your solution in Visual Studio. See Importing packages with files.
    3. Convert the project files to the web application format – select the project node (CMSApp) in the Solution Explorer, open the Project menu on the main toolbar and select Convert To Web Application.
    4. Rebuild the solution.

Conflicts of running sites

If the imported site uses the same administration domain name, presentation URL, or alias as one of the websites already running in your system, the import displays a warning at the end and the imported site does not start.

In such cases, you need to:

  1. Open the Sites application.
  2. Edit () the imported site and change the conflicting site’s Presentation URL, Administration domain name or Domain alias.
  3. Return to the list of sites and click Start site () next to the imported site.

Application restart

If you get the following error message at the end of the import process:

 “Application has been restarted and the logging of the import process has been terminated. Finish the import process manually.”

you need to finish the import process manually:

  1. Open the import package and extract all content of the <package>\Data\Files folder.
  2. Remove the .export extension from the names of all files in all extracted sub-folders.
  3. Rename all folders named ##SITENAME## to the code name of the target website and copy them to the root of the web project.
  4. Copy all contents of the cms_attachments folder (if it is present among the extracted folders) to the location in the target project where page attachments are stored (as configured in Settings -> System -> Files). Please note that this is applicable only when the system is configured to store page attachments in the file system (not in the database).
  5. Copy the content of all folders named as an object type (e.g. cms_avatar, cms_documenttype, etc.) to the root of your web project.

Import - Object selection settings

The following options are available in the Object selection step of the Import wizard.

Select the root of the tree (All objects) to access the following import settings:

Global selection

Load default selection

Preselects all objects based on your choices in Step 1 of the import wizard.

Select all

Selects all objects in the import package.

Select only new

Selects only those objects that do not exist in the target database (existing objects are unselected).

Deselect all

Clears selection for all objects in the import package.

Macro re-signing

User

The system uses signatures to ensure the security of macro expressions. The signatures are only valid in the environment of the application where the macros were originally saved.

To ensure that macros inside the data of imported sites or objects work correctly, you need to re-sign the macros. Select a user whose identity will be used to re-sign all contained macros during the import process. The user’s identity is considered in permission checks when evaluating macros from the package.

See Working with macro signatures for additional information.

Macros will not be re-signed if you leave the user unselected. However, the imported objects may not work correctly due to unresolved macros. Administrators can re-sign all macros in the system at any time using the System -> Macros -> Signatures interface.

Import settings

Update site definition

Displayed only when importing to an existing site. If enabled, all settings stored as part of the site object will be updated with those contained in the package. These settings are stored in the Site\cms_site.xml file inside the export package.

Assign all objects to the imported site (recommended)

If enabled, all imported site-related objects will be assigned to the imported site.

Run the site after import

If checked, the system attempts to start the new site immediately after the import is finished.

Delete incomplete site when import fails

If checked, the system deletes the site if any part of the import process fails.

Do not import objects where parent object is missing

If enabled, the import process skips any child objects whose parent objects is not present in the target system.

Import tasks (recommend)

If enabled, synchronization tasks included in the package will be performed.

Log staging synchronization tasks

If enabled, the system logs staging tasks reflecting all changes made by the import. Check this option to synchronize the imported data to other servers connected through Content staging.

Log integration tasks

If enabled, the system logs outgoing integration tasks for all changes made by the import. Check this option if you want to transfer the imported data to a system connected via the System integration bus.

Rebuild site search indexes

If enabled, the system rebuilds all search indexes assigned to the target site. Leave this option enabled if you are importing pages or other data you wish to add to existing search indexes.

Import files (recommended)

Some database objects are linked with physical files stored on the file system inside the web project. If you check this option, the import process creates all files that are included in the import package.

Import code files

Indicates if the import includes code files that require compilation, i.e. files with the following extensions: cs, vb, aspx, ascx

You cannot import code files if your application is precompiled.

Import custom assembly files

If enabled, the import process includes custom assembly files (dlls) that store the classes of certain custom objects. Applies to translation services, payment options, integration connectors, scheduled tasks, advanced workflow actions, marketing automation actions and smart search analyzers.

The system considers assemblies as custom if their name does not start with the CMS. prefix.

You cannot import assembly files if your application is precompiled.

Import global folders

If checked, the import process includes global files originally exported from the following folders:

  • ~/CMSGlobalFiles/
  • ~/CMSScripts/Custom/
  • ~/Old_App_Code/Global/

Import site folders

If checked, the import process includes site-related files originally exported from the following folders:

  • ~/App_Data/<site code name>/
  • ~/<site code name>/
  • ~/Old_App_Code/<site code name>/

Overwrite system queries

Available only when importing from an older version of Xperience. If checked, the system imports all queries from the package and overwrites the current ones.

If the package contains custom queries that you added to the system, it is necessary to have this option enabled.

The following object categories contain extra options that you can set:

Custom tables

Import custom table data

If enabled, custom table records (the actual data stored in the tables) included in the package will be imported together with the respective custom tables. If you are importing to an existing site, this option is disabled by default.

Pages

Import new pages

If enabled, pages included in the import package will be imported.

Notes:

  • When importing into an existing site, only new pages can be imported. Existing pages will not be overwritten.
  • To successfully import new pages, the system must contain the Page types of the given pages. You may need to select the page types for import in the object tree (Global objects -> Development -> Page types).

Import page histories

If enabled, page histories (i.e. previous versions of pages) will be imported.

Import page relationships

If enabled, page relationships will be imported.

Import page-level permissions

If enabled, page security settings made in the Pages application on the Properties -> Security tab will be imported.

Forms

Import form data

If enabled, forms data included in the package will be imported together with the forms.

Import physical files data

If checked, physical files saved within form records (if there are some) will also be imported.

Media libraries

Import media files

If enabled, media files (stored in database) included in the package will be imported together with the media libraries.

Import physical files

If enabled, physical files (stored in the file system) included in the package will be imported together with the media libraries.

Users

Import user dashboards

Indicates if the system imports the content of personalized widget dashboards together with imported users. If you are importing to an existing site, this option is not selected by default so that existing dashboards are not overwritten.

Import all user site specific dashboards

If checked, the content of all personalized widget dashboards is imported, even for users who are not selected in the import options.

This option appears only if the import package contains an exported site, not just separate objects. If you are importing to an existing site, this option is not selected by default so that existing dashboards are not overwritten.

Workflows

Import all workflow scopes

If checked, all workflow scopes will be imported, even if the respective workflows are not selected.

This option is only displayed when the import package contains an exported website, not only separate objects. If you are importing to an existing site, this option is not selected by default.

A list of object deletion tasks may also be displayed at the bottom of the list. If you leave the boxes checked, the objects will be deleted after you import the package.