Omicron Llama

Coding all day, every day.

Sharepoint – Moving Webs from a Parent Web to another Parent Web

I have an upcoming requirement to be able to move SPWebs from one parent SPWeb to another. Let me lay out the current architecture:

  • Site Collection
    • Active Projects (web)
      • Project 1 (web)
        • Doc Library
        • Custom List
      • Project 2 (web)
        • Doc Library
        • Custom List
Things to note here are that each of the Project’s webs (project 1, project 2) are created from a Site Template (stp) which create an empty Document Library and an empty Custom List.
The requirement is to implement full project lifecycle, from a pre-project stage (where work is Ad-hoc, and not officially classified by the company as a “Project” (yet to be monitored for time-keeping purposes)) – through to Live Projects, and then at end of Life for the project to be archived.
Since each project is stored within an SPWeb object, it will now be assumed that a Pre-project web is created at the start, once the work is commissioned as a full project, to move the SPWeb object and all it’s contents from the parent SPWeb containing the Pre-Project sites into the SPWeb that represents Active Projects; and similarly move the SPWeb into Archived Projects SPWeb at the end of it’s life cycle.
The assumed layout would then look like this:
  • Site Collection
    • Pre-Project Stage (web)
      • Pre-project 1 (web)
        • Doc Library
        • Custom List
      • Pre-project 2 (web)
        • Doc Library
        • Custom List
    • Active Project Stage (web)
      • Project 1 (web)
        • Doc Library
        • Custom List
      • Project 2 (web)
        • Doc Library
        • Custom List
    • Archived Project Stage (web)
      • Dead Project 1 (web)
        • Doc Library
        • Custom List
      • Dead Project 2 (web)
        • Doc Library
        • Custom List
My issue now is to find the most efficient way to move a project’s SPWeb from one parent to another, by using an option available to people with only certain privileges.
I’m gonna be busy…

4 thoughts on “Sharepoint – Moving Webs from a Parent Web to another Parent Web

Leave a Reply

Your email address will not be published. Required fields are marked *