Kentico CMS 7.0 Developer's Guide

Import and export of a website

Import and export of a website

Previous topic Next topic Mail us feedback on this topic!  

Import and export of a website

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

You can export and import a website using Kentico CMS API, using the CMS.CMSImportExport.ImportProvider/ExportProvider classes. You can use the following methods:

 

public static void ImportSite(string siteName, string siteDisplayName, string siteDomain, string fullSourcePath, string websitePath, UserInfo currentUser)

siteName - code name of the newly created website.

siteDisplayName - display name of the newly created website.

siteDomain - domain name of the newly created website.

fullSourcePath - physical disk path of the package containing the site that should be imported.

websitePath - physical disk path of the website root.

currentUser - the UserInfo object of the user under which the import should be performed.
 

public static void ExportSite(string siteName, string fullExportFilePath, string websitePath, bool template, UserInfo userInfo)

siteName - code name of the site to be exported.

fullExportFilePath - physical disk path of the export package.

websitePath - physical disk path of the website root.

template - if false, a .zip file containing the site will be created under fullExportFilePath (should be the full path including the .zip file name). Otherwise, the whole site will be exported as a website template to the same location (in this case, the full path should be used without any file name specified).

userInfo - the UserInfo object of the user under which the export should be performed.