How to move a WSS 3.0 web
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.