SharePoint 2010 to SharePoint 2013/2016/2019 Migration Steps (Database attach method)

sharepoint 2010 to sharepoint 2013 migration

This SharePoint tutorial, we will discuss how to migrate from SharePoint 2010 to SharePoint 2013/2016/2019 by using database upgrade approach (without using any 3rd party tool).

As we know Microsoft has released a different version of SharePoint Server in the last few years so it is very difficult to manage your content in the old version of server as less support by Microsoft.

SharePoint deveopment training course

So no need to worry about it as we have a solution to move our content from old version to new version. If we see, there are many 3rd party tool in the market for migration but we have to pay for it.

So In this article, we will discuss how to migrate the content from the old SharePoint server to the new server manually through database content DB Migration.

This SharePoint tutorial helps for the below scenarios:

  • sharepoint 2010 to sharepoint 2013 migration
  • sharepoint 2010 to sharepoint 2016 migration
  • sharepoint 2010 to sharepoint 2019 migration

There are two ways we can migrate from SharePoint older versions to the newer version.

  • Using a 3rd Party tools like Metalogix or Sharegate
  • Using the SharePoint database upgrade approach

In this tutorial, we will not discuss the 3rd party tool approach, we will focus on SharePoint database upgrade approach for migration.

In the database upgrade approach, we can migrate from one version to the immediate next version.

Meaning, we can migrate from SharePoint 2010 to SharePoint 2013, we can not directly migrate SharePoint 2010 to SharePoint 2016.

To migrate SharePoint 2010 to SharePoint 2016, we have to migrate from SharePoint 2010 to SharePoint 2013 first and then migrate from SharePoint 2013 to SharePoint 2016.

But almost all the 3rd party SharePoint migration tools provide direct migrations from one version t another version.

SharePoint 2010 to SharePoint 2013 Migration Steps

Below are the steps to Migrate contents from SharePoint 2010 to SharePoint 2013 by using the database upgrade approach.

Step 1: Update your SharePoint 2010 farm with the latest service packs/patches.

sharepoint 2010 to sharepoint 2013 migration
sharepoint 2010 to sharepoint 2013 migration

Step 2: Change your SharePoint 2010 web applications from classic mode to claims authentication.

sharepoint 2010 to sharepoint 2016 migration
sharepoint 2010 to sharepoint 2016 migration

Step 3: Delete unused site collection, orphaned user, and sites (optional). you can follow the below link to delete unused files. http://www.sharepointdiary.com/2014/05/find-and-delete-unused-sharepoint-databases-from-sql-server.html

Step 4: Configure the SharePoint 2013 server in your Machine and Create a Web Application and Activate all features which are required during Migration.

Step 5: Next Backup and Restore SharePoint 2010 Content Databases to SharePoint 2013 SQL Server: 

Backup SharePoint Content Database:

sharepoint 2010 to 2013 migration database attach
sharepoint 2010 to 2013 migration database attach

Restore SharePoint Content Database:

sharepoint 2010 to 2013 migration approach
sharepoint 2010 to 2013 migration approach

Step 6: Verify the Content Databases with Test-SPContent Database by using below Powershell command. It will help you to find issues such as solution dependencies, wide lists, missing features, orphaned sites, etc.

Test-SPContentDatabase -Name <Database name> -WebApplication <Web-App-URL>

Step 7: Next fix all issues which you have found in this screen. Fix it one by one till zero error found.

sharepoint 2010 to 2013 migration database attach
sharepoint 2010 to 2013 migration database attach

Step 8: Next remove the default content DB which has already created in your SharePoint 2013 server while configuration.

Step 9: Next Mount Content database in SharePoint 2013 Server by using the following command. Remember: Always mount the root site collection’s database first! Also, if you migrating My sites, Migrate My Site Host First!

Mount-SPContentDatabase -name “Database name” -DatabaseServer “Database Server Name” -WebApplication “Web-App-URL” -confirm: $false

Once mounted the content database to web application successfully, The site collection is accessible in SharePoint 2010 Mode!

Step 10: Next Upgrade Site Collections to move to SharePoint 2013. By default, after migrating from SharePoint 2010 to SharePoint 2013, All migrated site collections will be on SharePoint 2010 format, retaining its old look and feel and other functionalities. We’ve to explicitly migrate all site collections to SharePoint 2013.

This can be done by Site collection administrators by clicking links from upgrade reminder banner.

To upgrade the site you have to go to the below path.

(Central Admin >> Upgrade and Migration >> Check upgrade status)

Step 11: Next after few minutes, it will appear an upgrade status screen where you can see the status of your upgrade.

sharepoint 2010 to sharepoint 2019 migration
sharepoint 2010 to sharepoint 2019 migration

Step 12: In the same time, if you will open your site, then you will get many errors as below screenshot.

sharepoint 2010 to 2013 migration database attach
sharepoint 2010 to 2013 migration database attach

Step 13: Once the upgrade is done, Open your site collection and again it will ask you to change the Hive folder to 15. It means still your site collection is pending for upgrade. So click the button to start to upgrade.

sharepoint 2010 to sharepoint 2016 migration
sharepoint 2010 to sharepoint 2016 migration


Step 14:
Once your upgrade has been completed, you will get a confirmation message as below image.

sharepoint 2010 to sharepoint 2013 migration
sharepoint 2010 to sharepoint 2013 migration

Step 15: Next refresh your site collection and check, the User Interface of the site will look like SharePoint 2013 View.

This is the whole steps for migrating SharePoint 2010 site to SharePoint 2013 Site.

Please follow the same steps for Migrating SharePoint 2013 site to SharePoint 2016 and SharePoint 2019.

Step 16: Upgrade your Visual Studio Solution.

Step 17: Deploy your WSP file in the targeted site.

Step 18: Map paths in the Master page.

Few Point Should be Noted while Migration.

1: Check-in all pages to avoid permission issue while migration

Upgrade-SPSite -identity http://hqinternetdev13/ -VersionUpgrade

2: For activation of publishing feature, we have to run below code.

   Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
 
#Variables
$WebAppURL="http://hqinternetdev13/"
$SiteFeatureName = "PublishingSite"
$WebFeatureName = "PublishingWeb"
 
#Get all site collections of the web app and iterate through
$SiteColl= Get-SPSite -WebApplication $WebAppURL -Limit ALL
Foreach($Site in $SiteColl)
{
    write-host "Processing site collection:"$Site.URL -ForegroundColor Yellow
    #Check if publishing feature is already activated in the site
    $Feature = Get-SPFeature -Site $Site.URL | Where-object {$_.DisplayName -eq $SiteFeatureName}
 
    if($Feature -eq $null)
    {   
        #Enable the Publishing feature
        Enable-SPFeature -Identity $SiteFeatureName -url $Site.URL -Confirm:$False
    
        Write-host "Publishing Feature Activated on $($Site.URL)" -ForegroundColor Green   
    }
    else
    {
        Write-host "Publishing Feature is already Active on $($Site.URL)" -ForegroundColor Red
    }
 
    #Loop through each web in the site collection
    Foreach($Web in $Site.AllWebs)
    {
        write-host "Processing Web"$Web.URL -ForegroundColor Yellow
        #Check if publishing feature is already activated in the web
        $Feature = Get-SPFeature -Web $Web.URL | Where-object {$_.DisplayName -eq $WebFeatureName}
        if($Feature -eq $null)
        {   
            #Enable the Publishing feature
            Enable-SPFeature -Identity $WebFeatureName -url $Web.URL -Confirm:$False
    
            Write-host "Publishing Feature Activated on $($Web.URL)" -ForegroundColor Green   
        }
        else
        {
            Write-host "Publishing Feature is already Active on $($Web.URL)" -ForegroundColor Red
        }
    }
}

3: Change authentication type from classic to claim based by using below code.

$WebAppName = "http://hqinternetdev13"
$wa = get-SPWebApplication $WebAppName
$wa.UseClaimsAuthentication = $true
$wa.Update()
$account = "EnjoySharePoint\spupgrade"
$account = (New-SPClaimsPrincipal -identity $account -identitytype 1).ToEncodedString()
$wa = get-SPWebApplication $WebAppName
$zp = $wa.ZonePolicies("Default")
$p = $zp.Add($account,"PSPolicy")
$fc=$wa.PolicyRoles.GetSpecialRole("FullControl")
$p.PolicyRoleBindings.Add($fc)
$wa.Update()
$wa.MigrateUsers($true)
$wa.ProvisionGlobally()

  4: Change Site Collection URL

$site = Get-SPSite http://hqinternetdev16/sites/Departments1
$site.Rename("http://hqinternetdev16/sites/Departments ")

5: Script for migration of subsite to the site collection in SharePoint

Add-PSSnapin Microsoft.SharePoint.PowerShell
$site =Get-SPSite "http://hqinternet19/sites/Departments"
$web = $site.RootWeb
$pweb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($web)
 
# This code (as an example) uses the first layout as the default.
$layouts = $pweb.GetAvailablePageLayouts()
$pweb.SetDefaultPageLayout($layouts[0], $false)
$pweb.Update()
$web.Dispose()

You may like following SharePoint migration tutorials:

Hope this SharePoint tutorial will help you to do a smooth migration from SharePoint 2010 to SharePoint 2013 or from SharePoint 2010 to SharePoint 2016 or from SharePoint 2010 to SharePoint 2019.

Check out Best Alternative to InfoPath -> Try Now

free sharepoint training

SharePoint Online FREE Training

JOIN a FREE SharePoint Video Course (3 Part Video Series)

envelope
envelope

About Rajkiran Swain

Rajkiran is currently working as a SharePoint Consultant in QATAR . Rajkiran having 6 + years of experience in Microsoft Technologies such as SharePoint 2019/2016/2013/2010, MOSS 2007,WSS 3.0, Migration, Asp.Net, C#.Net, Sql Server, Ajax, jQuery etc.He is C#Corner MVP (2 Times).

View all posts by Rajkiran Swain →
    • Open your solution file in higher version of Visual studio and publish you webpart file with new URL .