Import and export of the web site

You can export and import a web site 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)
- siteName - code name of the newly created web site
- siteDisplayName - display name of the newly created web site
- siteDomain - domain name of the newly created web site
- fullSourcePath - physical disk path of the package with exported site
- websitePath - physical disk path of the web site root
 
public static void ExportSite(string siteName, string fullExportFilePath, string websitePath, bool template)
- siteName - code name of the web site to be exported
- fullExportFilePath - physical disk path of the export package
- websitePath - physical disk path of the web site 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 to the same location (should be the full path without any file name in this case).