Clone Sharepoint website

Hello Team:

We would like to clone sharepoint site using powershell, how it is possible? Please provide sample.

We need to clone all the users, workflows, permissions, how ever we would like to have different URL for the cloned site.

Who is Participating?
Yagya ShreeConnect With a Mentor Commented:

When you are talking about cloning, in sharepoint terms we called it backup/restore

Below are the powershell command to do backup/restore of a site collection in the same farm, same web application but different url:



You should not use a third party tool to do this as this  is a OOB feature present in sharepoint itself.
Meir RivkinFull stack Software EngineerCommented:
Clone a SharePoint 2010 Site using PowerShell

btw, it clones single site collections not entire web application.
As the previous two proposed solutions do not take into account the backing up and restore of workflows, I don't think they apply to your question. If it is the full web application (being http://yoursite) that you want to copy, then you can just use content database backup and restore:

Backup the content database of the web application
Create the new web application with the new url and temp_content_db as database name
 Attach the content database to SQL
Add the content database to the web application
Delete the temp_content_db

If it is just a site that you want to move including its workflows, you will need to look at 3d party tools (like Sharegate...)
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

CalmSoulAuthor Commented:
What is the  process of taking backup of only content database?
CalmSoulAuthor Commented:
Thanks KoenVosters, can you please clear the point when you said " Attach the content database to SQL" what do you mean by that?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.