SharePoint Migration 2010 to 2013

1. Introduction

This document aims to discuss the overall process of SharePoint migration 2010 to 2013. So the first question is: Why it is necessary to upgrade SharePoint 2010 to 2013. The reason is: there are so many stunning features which can add more values than 2010 to your organizations.

  • The Design Manager
  • Device Channels
  • HTML5, CSS3 and all that good stuff
  • Community Sites and Community Portal
  • The new Search experience and what it means
  • Content Search Web Part
  • Apps and the App Store
  • WCM Web Content Management

Please note that this my personal experience with migration. All scenario may not match with your environment. In that case, you have to plan very carefully.

2. Planning

Planning is very much important in migration. In the very beginning, you have to analyse you existing SharePoint 2010 farm. Please do note down everything. I have done following things in my case.

  • SQL server version
  • Number of web applications
  • Number of service applications
  • Number of features in each web application
  • Number of custom solutions (farm & sandboxed)
  • Hardware & Software
  • Authentication provider

Based on the existing farm, you have to prepare a new farm for SharePoint 2013.

3. Migration Process

The official words for SharePoint migration as given below.

The database-attach method is the only supported method for upgrading from SharePoint 2010 Products to SharePoint 2013

4. Migration Steps

I hope you new farm (2013) is ready as per your planning. Now we need to follow below steps for migration:

  1. Database backup from old server
  2. Database restore in new server
  3. Create new web application
  4. Remove content database from
  5. Test content database
  6. Mount database
  7. Add & Install custom solutions
  8. Upgrading sites
  9. User Migration

4.1 Database backup

It is the very first step of migration. Database backup can be taken in several ways like command line, using management studio and etc. I always prefer command line. Before taking the database backup, set the database to read-only mode.
"C:\Program Files\Microsoft SQL Server\110\Tools\Binn\osql.exe" -E -Q "BACKUP DATABASE '{database name}' TO DISK='{path}' WITH FORMAT"

  • {database name} is the name of your content database. Example: ‘WSS_Content’
  • {path} is where you want to save the backup file. Example: ‘C:\db_back\sp_2010.bak’
  • Don’t forget to change SQL version number. In my case, it was 110.

4.2 Database restore

Now login in your new database server. You can restore old database using query or UI from Management studio. If you want to it using UI, then follow these steps from MSDN. Using query window, just open the query window in your management studio, then paste following query & execute it.

RESTORE DATABASE '{new database name}' FROM DISK = '{path}'
MOVE '{old database name}' TO '{new mdf path}',
MOVE '{old log name}' TO '{new log path}'

  • {new database name} is the name of your new database. Example: ‘WSS_Content_Migrated’
  • {path} where your backup file is located. Example: ‘C:\sp data\sp_2010.bak’
  • {old database name} is the name of your old database. Example: ‘WSS_Content’
  • {new mdf path} where you want to save new mdf file. Example: ‘C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\WSS_Content_Migrate.mdf’
  • {old log name} name of the old log file. Example: ‘WSS_Content_log’
  • {new log path} where you want to save new log file. Example: ‘C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\WSS_Content_Migrate.ldf’

Now wait till script execution is done. Again do not forget to change all parameters in query.

4.3 Create New Web Application

After successfully restoring your content database, login in your SharePoint 2013 server. Now you have to create a new web application in where all site collections will be restored. It is recommended to use same host header as like as old web application in 2010. You can do it from central administration or PowerShell. Following is the PowerShell command for creating new web application.
New-SPWebApplication -Name {Name} -ApplicationPool {ApplicationPool} -AuthenticationMethod {WindowsAuthType} -ApplicationPoolAccount {ApplicationPoolAccount} -Port {Port} -URL {URL}

  • {Name} is the name of the new web application. Example: “SharePointPlex Intranet Portal”
  • {ApplicationPool} is the name of the application pool. Example:  “SharePointPlex Pool”
  • {WindowsAuthType} is either “NTLM” or “Kerberos”. Kerberos is recommended.
  • {ApplicationPoolAccount} is the user account that this application pool will run as. Example: (Get-SPManagedAccount “domainName\userName”)
  • {Port} is the port on which the web application will be created in IIS. Example: 80
  • {URL} is the public URL for the web application. Example:

4.4 Remove Content Database

If your new web application is associated with a content database, then you need to detach/remove that database from your web application. Again you can do it from central administration or PowerShell.

To detach database only, you can use following command

Dismount-SPContentDatabase "{ContentdBName}"

  • “{ContentdBName}” is the name of your content database

To remove database permanently, you can use following command

Remove-SPContentDatabase "{ContentdBName}"

  • “{ContentdBName}” is the name of your content database

4.5 Test Old Content Database

In this step, we need to test old content database with our new web application to verify all customization referenced within the old content database. It will give us a complete report of customization and services activated in the content database. It is better to export the logs in a csv file for better visibility. Now run following command to test your content database.

Test-SPContentDatabase -Name '{database name}' -WebApplication {url of web application} | Out-File {log path}

  • {database name} is the of content database. Example: ‘WSS_Content_Migrated’
  • {url of web application} is the url of new web application. Example:
  • {log path} where you want to save log file. Example: ‘C:\log\test_database_log.csv’

Now open ‘C:\log\test_database_log.csv’ and based on that do some troubleshooting. This log file does not contains the issues only. It will give you some suggestions as well.

4.6 Attach Old Database

If you are done successfully with above steps, then it’s time to attach old database with new web application. To do this, you can run following command.

Mount-SPContentDatabase {database name} -DatabaseServer {database server name} -WebApplication {web application url} -AssignNewDatabaseId

  • {database name} is the name of your content database. Example: “WSS_Content_Migrated”
  • {database server name} is the name of database server. Example: “SRV-DBSQL12”
  • {web application url} is the url of your web application. Example:
  • Please note that -AssignNewDatabaseId is very important. This will allow the New Database be be attached to the farm without a conflict of Database Id.

You may get following error in this step but do not worry about. Just open the log file and troubleshot according to it.

Mount-SPContentDatabase : Upgrade completed with errors. Review the upgrade log file located in
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\LOGS\Upgrade-20151230-173217-657.log.
The number of errors and warnings is listed at the end of the upgrade log file.
At line:1 char:1
+ Mount-SPContentDatabase "WSS_Content_Migrated" -DatabaseServer "SRV-DBSQL12" -We ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (Microsoft.Share...ContentDatabase:SPCmdletMountContentDatabase) [Mount-SPContentDatabase], SPUpgradeException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletMountContentDatabase

4.7 Add custom solutions

In this step, you need to add your all custom solutions which have been developed using visual studio 2010. If you are sure that your custom solutions will work without up-gradation, then you can add them using PowrShell directly.

Add-SPSolution {path of the solution}
Install-SPSolution –Identity {solution name}.wsp –WebApplication {web application url} -GACDeployment

If your solutions contain third-party libraries, then up-grade them using visual studio 2013 and finally add them in your web application.

4.8 Upgrade Sites

Now login in your site. You should get the same interface as SharePoint 2010. So it’s the time to upgrade your sites. In the header of your site, you should get following notification:


Now click on the Start now link, then following screen will appear


If you click on Upgrade this site collection, It will ask for your confirmation.


Now confirm it and wait untill it is done!


When everything is done, you should get everything as SharePoint 2013.

4.9 User Migration

Once you are done with site up-gradation, then you have to migrate you SharePoint users.  If there is a change between your authentication model, then this step is needed. Basically, you have to change the prefix of all SharePoint users. To do that, you can take help of my following scrips.

$web = Get-SPWeb {web application url}
$userName = {user name}
$OlduserID = '{domain name}\' + $userName
$newuserID = 'i:0#.w|{domain name}\' + $userName
$user = Get-SPUser -Web $web -Identity $OlduserID
If($user) {
$newuserID = $web.EnsureUser($newuserID)
Move-SPUser -Identity $user -NewAlias $NewuserID -Confirm:$false -IgnoreSID
Write-Host $employee.UserName + " Migrated"
} Else{
Write-Host $employee.UserName + " unable to migrate"

In my case old user was like


After migration, It looks like


NB: My domain name was sharepointplex.

5. Conclusion

I wish your migration has gone very smoothly. If it does not, then feel welcome to contact us any time from any where! Our expert team is always ready to help you. You can use the comment section  as well. We will try to reply within short time.