How to rename a WSS site

9 12 2005

I have been receiving a few questions about how to rename a WSS site lately, so I thought I would post the solution here so that everyone can benefit from my experience.

The scenario is, we have a top level site collection located at http://server/sites/site1 but we want to rename it to http://server/sites/site2

There are a number of ways to do this, but if you are interested in performing a full rename (making the site identical – same name, same content, etc) you will need to use the STSADM tool.

Steps:

  1. On your front end web server, open a command prompt.
  2. Type cd %systemdrive%\program files\common files\microsoft shared\web server extensions\60\bin
  3. Perform the backup by typing stsadm –o backup –url http://server/sites/site1 -overwrite -filename %systemdrive%\backup.dat
  4. If you are planning on restoring the site to the same virtual server (the same content database) you will now need to delete the original site. We need to do this due to the following (from the documentation):

About GUIDs and Restoring Site Collections If you attempt to restore a backup of a site collection more than once to the same content database, you may get the following error message: “No content databases are available for restoring this site collection. Create a new content database and then try the restore operation again.” This is because the globally-unique identifiers (GUID) for lists are preserved in the backup file and reused during restore, but the content database requires list GUIDs to be unique. Therefore, you cannot restore a site collection twice to the same content database, and must instead use a different content database.

  1. Now that we have that sorted out, you can perform this optional step (you would generally want to do this)
  2. To remove the original site type stsadm –o deletesite –url http://server/sites/site1
  3. Now we are ready to restore to our new site name, type the following in the command prompt
  4. stsadm –o restore –url http://server/sites/site2 -filename %systemdrive%\backup.dat
  5. We have now successfully restored the original site into a new site collection, with a new name :)

Hope this helps someone else out there.


Actions

Information

7 responses

3 07 2007
Anonymous

AWESOME! This worked like a charm in MOSS 2007. You saved my life!

Well, you save me from a lot of work anyway…

Thanks again!

27 09 2007
Steve

Great instructions! Worked awesome!

BTW: in WSS3.0 – it’s in …\12\bin

Such a time saver!

16 11 2007
Wobble Wobble » Blog Archive » Renaming Windows SharePoint Services sites

[...] for an answer, and I stumbled on Matthew Cosier’s blog and he has already blogged about how to rename a site collection’s URL. So I tried it out and it worked for [...]

7 04 2008
G.Howard

This is hot, it worked and I even did it during production hours without any problems….

Thanks for this tidbit…

13 05 2008
Bacchu Kailash

Hi,
I tried this and it successfully restored my site collection. However, I have a document library that is behaving weird. I cannot go to a subfolder within the document library and it does not like it when I try to create a new folder. also I cannot do edit properties on items in the library. Any Ideas as to why this may happen. I Backed up the site Just like you did above. I then Deleted the oldSite collection. Then I Restored it to a new Site collection with a different name but on the same web application.
Your help will be greatly appreciated.

Thanks,
Bacchu

28 07 2008
Simon Duschek

@Bacchu (but I would also appreciate some help from anybody else)

I have the same problem at work, after renaming a publishing site under our site collection (but I didn’t rename it with backup and restore – I did it under “Site Settings > Title, Description, and Icon”).

How did you fix this problem Bucchu??

Thanks for your help!!

Simon

1 05 2009
Renaming SharePoint sites with stsadm | verbose logging

[...] Matthew Cosier’s Blog: How to rename a WSS site Share and Enjoy: [...]

Leave a comment