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. Choose 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.

When importing to instances installed in the web application format, you may need to perform additional steps to complete the import. See Importing to web application projects.

Importing packages from different Kentico versions

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

Importing packages from previous versions of Kentico is possible, but we recommend using the same version for all of your instances whenever possible.

Packages from different versions of Kentico have a different data structure. When importing packages from an older version of Kentico 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 Kentico 8.2 to learn how to properly upgrade your site.
  • When importing Page templates, never overwrite any of the UI templates used by the Kentico interface (you can find a list in the Page templates application 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.

Conflicts of running sites

If the imported site uses the same domain name 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 Site 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, forums_forum, etc.) to the root of your web project.

Re-signing imported macro expressions

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 using the System -> Macros -> Signatures interface. See Working with macro signatures for additional information.

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.

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.

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 notification gateways, 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:

  • ~/App_Code/Global/
  • ~/CMSGlobalFiles/
  • ~/CMSScripts/Custom/
  • ~/App_Code/Controllers/
  • ~/Controllers/Global/
  • ~/Views/Global/
  • ~/Models/Global/

Import site folders

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

  • ~/App_Code/<site code name>/
  • ~/App_Data/<site code name>/
  • ~/<site code name>/
  • ~/Controllers/<site code name>/
  • ~/Views/<site code name>/
  • ~/Models/<site code name>/

Overwrite system queries

Available only when importing from an older version of Kentico. 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:

Automation processes

Import all site specific triggers

If checked, all site-specific triggers will be imported, even if the respective processes 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 deselected by default.

Custom tables

Import custom table data

If checked, 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.

Import blog comments

If enabled, blog comments will be imported together with blog post pages.

Import event attendees

If checked, event attendees will be imported together with all imported events.

Import all user personalization

If checked, user personalization of all users will be imported, even for users who are not selected to be imported. If you are importing to an existing site, this option is not selected by default.

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.

Forums

Import forum posts

If enabled, forum posts included in the package will be imported together with the forums.

Groups

Import media files

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

Import physical files

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

Import all group memberships

If enabled, user memberships will be imported together with the selected groups.

Message boards

Import board messages

If enabled, board messages included in the package will be imported together with the message boards.

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.

Page templates

Import all site specific page template scopes

If checked, site-specific page template scopes will be imported for all page templates, even if a page template itself is not selected to be imported.

This option is only displayed with page templates in the Global section of the tree and only 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.

Import web part and zone variants with the selected page templates

If checked, web part and zone variants (from MVT testing or Content personalization) included in the package will be imported together with the selected page templates.

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.