Import a list or document library in SharePoint 2013


Applies to: SharePoint Foundation 2013, SharePoint Server 2013

Topic Last Modified: 2016-12-16

Summary: Learn how to import a site, list, or document library in SharePoint 2013.

You can import a site, list, or document library in SharePoint 2013 by using Windows PowerShell.

In this article:

Although you can use either Windows PowerShell or Central Administration to export a site, list, or document library, you can use only Windows PowerShell to import a site, list, or document library. For information about how to export lists or libraries, see Export sites, lists, or document libraries in SharePoint 2013.

Before you begin this operation, review the following information:

  • You can use importing as a method of restoring the items, or as a method of moving or copying the items from one farm to another farm. You can import a site, list, or document library from a backup of the current farm, from a backup of another farm, or from a read-only content database. To import from a read-only content database, you must first attach the read-only database. For more information, see Attach and restore a read-only content database in SharePoint 2013.

  • You cannot import a site, list or document library exported from one version of SharePoint 2013 Products to another version of SharePoint 2013 Products.

Because SharePoint 2013 runs as websites in Internet Information Services (IIS), administrators and users depend on the accessibility features that browsers provide. SharePoint 2013 supports the accessibility features of supported browsers. For more information, see the following resources:

You can use Windows PowerShell to manually import a site, list, or document library or as part of a script that can be run regularly.

To import a site, list or document library by using Windows PowerShell
  1. Verify that you have the following memberships:

    • securityadmin fixed server role on the SQL Server instance.

    • db_owner fixed database role on all databases that are to be updated.

    • Administrators group on the server on which you are running the Windows PowerShell cmdlets.

    An administrator can use the Add-SPShellAdmin cmdlet to grant permissions to use SharePoint 2013 Products cmdlets.

    If you do not have permissions, contact your Setup administrator or SQL Server administrator to request permissions. For additional information about Windows PowerShell permissions, see Add-SPShellAdmin.
  2. Start the SharePoint 2013 Management Shell.

    • For Windows Server 2008 R2:

      • On the Start menu, click All Programs, click Microsoft SharePoint 2013 Products, and then click SharePoint 2013 Management Shell.

    • For Windows Server 2012:

      1. On the Start screen, click SharePoint 2013 Management Shell.

        If SharePoint 2013 Management Shell is not on the Start screen:

      2. Right-click Computer, click All apps, and then click SharePoint 2013 Management Shell.

    For more information about how to interact with Windows Server 2012, see Common Management Tasks and Navigation in Windows Server 2012.

  3. At the Windows PowerShell command prompt, type the following command:

    Import-SPWeb -Identity  <SiteURL>  -Path <ImportFileName>  [-Force] [-NoFileCompression] [-Verbose]


    • <SiteURL> is the URL for the site that you are importing to.

    • <ImportFileName> is the name of the file that you are exporting from.

    The site or subsite that you are importing must have a template that matches the template of the site specified by Identity.

    You can also use the Get-SPWeb cmdlet and pass the ID to Import-SPWeb by using the Windows PowerShell pipeline. The value of the Path parameter specifies the path and file name of the file from which to import the list or library. To include the user security settings with the list or document library, use the IncludeUserSecurity parameter. To overwrite the list or library that you specified, use the Force parameter. You can use the UpdateVersions parameter to specify how versioning conflicts will be handled. To view the progress of the operation, use the Verbose parameter.

    The NoFileCompression parameter lets you specify that no file compression is performed during the import process. Using this parameter can lower resource usage up to 30% during the export and import process. If you are importing a site, list, or document library that you exported from Central Administration, or if you exported a site, list, or document library by using Windows PowerShell and you did not use the NoFileCompression parameter in the Export-SPWeb cmdlet, you cannot use this parameter in the Import-SPWeb cmdlet.

    There is no facility in the Import-SPWeb cmdlet to import a subset of the items within the export file. Therefore, the import operation will import everything from the file.

For more information, see Import-SPWeb.

We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.