Import and export of the web site

You can export and import a web site using Kentico CMS API, using the CMS.ImportExport.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, the files are created in a temporary folder and compressed, otherwise, they are exported into a new folder of the same name as the site code name