Ok…I'm sure this is a feature but I haven't found it documented anywhere 🙂
With MOSS we have the possibility to move a website to another position using the 'Manage content and structure' feature in the Site Actions menu.I already knew this functionality was also available in WSS 3.0 but I had to do it from the object model (rename the web's url and use web.update())
By accident I just found out you can already move a website using STSADM out of the box!
The operation 'renameweb' needs two parameters to function:
- the url of the web you want to rename
- the name of the new web
Apparently the 'name' of the web is NOT the title but the URL :o).
So if you would have two sites, say 'test' and 'test2' who are siblings, you can make test2 a child of test using the following command:
stsadm -o renameweb -url http://localhost/test2 -name test/test2
stsadm -o renameweb -url http://localhost/test2 -newname test/test2
One remark…this is only possible with sites in the same site collection.
8 comments
Actually, renameweb operation changes the web name, not directly the URL. Although, when the web name is modified the URL changes too.
But you can't completely change the URL using this operation, so you can't move the web this way. For example, it is not possible to move http://localhost/Site/SubSite to http://localhost/SubSite. "http://localhost/Site" can't be change. So, the best you can't do using renameweb operation is changing the url http://localhost/Site/SubSite by Gribouillon
yep, true. I did a test based on your remark and you actually CANNOT change the parentweb with the renameweb function.
and it really is ‘newname’ 🙂
excuse me 😉
bartg
One question: how can the name in the navigation-bar be changed ?
URL and title changes … but not in the navigation !?! 🙁
Sebi
the location of the navigation should change…changing the title is just as easy as going to the ‘top link bar’ menu at site settings and change the description.
bartg
No – these seems not to work for teamsites and blank sites …
… at least on my four different WSS3.0-installations ?! 🙁
Please try it out …
Sebi
Here, just use the content migration in the SDK
http://msdn2.microsoft.com/en-us/library/ms441339.aspx
Aria
Aria,
Nice! Good tip!
However, if I ´just want to move some site´ and need to write a tool for it I probably won´t…. That said, I think I´m going to build one right now 😉
bartg
Is there other way to move a subsite to different site.
http://test1.mysite.com/subsite1 and http://test2.mysite.com
subsite1 move to other url
http://test2.mysite.com/subsite1
iryl