Managing Sites and Subsites

Web sites in Microsoft Windows SharePoint Services are organized into site collections (site collection: A set of Web sites on a virtual server that have the same owner and share administration settings. Each site collection contains a top-level Web site and can contain one or more subsites.). Each site collection has a top-level Web site (top-level Web site: The default, top-level site provided by a Web server or virtual server. To gain access to the top-level Web site, you supply the URL of the server without specifying a page name or subsite.). This top-level Web site can have multiple subsites (subsite: A complete Web site stored in a named subdirectory of the top-level Web site. Each subsite can have administration, authoring, and browsing permissions that are independent from the top-level Web site and other subsites.), and each subsite can have multiple subsites. Because sites are nested in a hierarchy within the site collection, it can be challenging to manage them all.

 Note   Local server administrators and members of the SharePoint administrators group can perform any task that a site collection administrator can perform for a site collection.

You can use two methods to manage sites and subsites:

  • HTML Administration pages

When you use HTML Administration pages to manage sites in a site collection, be aware that some features are only available from the top-level Web site. These features include managing site collection galleries, viewing storage space allocation, viewing the site hierarchy, and listing all users in the site collection.

  • Command-line administration

If you use the command line to manage sites in a site collection, the levels are not as important, because you can always specify the full Uniform Resource Locator (URL) (Uniform Resource Locator (URL): An address that specifies a protocol (such as HTTP or FTP) and a location of an object, document, World Wide Web page, or other destination on the Internet or an intranet. Example: http://www.microsoft.com/.) path for a site you want to manage, and you can adjust the URL to list sites and subsites at any level in the site collection. However, you must be a member of the administrators group for the local server computer to use the command-line tools.

Managing Sites and Subsites by Using HTML Administration Pages

You can use the HTML Administration pages to view a list of subsites within a site collection or for a particular subsite. You can also use HTML Administration pages to delete a site or subsite. Depending on your administrative access level, you can perform different actions.

  • Members of the local server's administrator group and members of the SharePoint administrators group can delete a site collection from SharePoint Central Administration. Site collection administrators can also delete a site collection by using the Top-Level Site Administration page. Deleting the site collection deletes the top-level Web site in that site collection, as well as any subsites.
  • Members of the site collection administrators group can view a list of all subsites below the top-level Web site in that site collection from the View Site Hierarchy page. They can delete a specific subsite in the site collection or the entire site collection by navigating from the View Site Hierarchy page to the Site Administration page for the subsite or top-level Web site (to delete a site collection).
  • Members of the Administrator site group (site group: A custom security group that applies to a specific Web site. Users are assigned to site groups to grant them rights on a SharePoint site.) for a subsite can only see the immediate subsites below their subsite. They can delete the subsites they see, provided that the subsites have no subsites beneath them.

Viewing Subsites

If you are a member of the Administrator site group for a site, you can view a list of subsites from the Manage Sites and Workspaces page in Site Settings. This list displays only the immediate set of subsites for the current site (one level down).

View the list of immediate subsites for a site
  1. On the site, click Site Settings.
  2. On the Site Settings page, under Administration, click Manage sites and workspaces.

If you are a site collection administrator, you can see the full list of subsites for the site collection (any subsites of the top-level Web site, plus any of their subsites) by using the View Site Hierarchy page in Site Administration.

View the entire list of subsites within a site collection
  1. On the top-level Web site for the site collection, click Site Settings.
  2. On the Site Settings page, under Administration, click Go to Site Administration.
  3. Under Site Collection Administration, click View site hierarchy.

Deleting a Site Collection

If you are an administrator of the local server computer on which a site resides or a member of the SharePoint administrators group, you can use the Delete Site Collection page in the Central Administration or Virtual Server Administration pages to delete a site collection (a top-level Web site and any subsites beneath it).

When you delete a top-level Web site, you also delete any subsites beneath it. Before you delete a site, be sure to verify that there are no subsites beneath it, or that you no longer need the subsites beneath it. You cannot recover a subsite unless you have a backup version of the subsite. For more information about backing up a site, see Backing Up and Restoring Databases by Using the SQL Server 2000 and SQL Server 2005 Tools.

Delete a site collection from SharePoint Central Administration
  1. Click Start, point to All Programs, point to Administrative Tools, and then click SharePoint Central Administration.
  2. On the Central Administration page, under Virtual Server Configuration, click Delete site collection.
  3. In the URL of the site to delete box, type the full URL to the site.
  4. Click OK.

If you are the owner of or a site collection administrator for a top-level Web site, you can delete the top-level Web site by using the Delete This Site page in the Site Administration pages.

Delete a site collection from Site Administration
  1. On the subsite, click Site Settings.
  2. On the Site Settings page, under Administration, click Go to Site Administration.
  3. Under Management and Statistics, click Delete this site.
  4. On the confirmation page, click Delete.

Deleting a Subsite

Depending on your administrative access level, you can use different methods to delete a subsite:

  • If you are a member of the Administrator site group for the subsite you want to delete, you can use the Delete This Site page in Site Administration.
  • If you are a member of the Administrator site group for the site one level up from the subsite you want to delete, you can use the Manage Sites and Workspaces page in Site Settings for your subsite.

You cannot recover a subsite unless you have a backup version of the subsite. For more information about backing up a site, see Backing Up and Restoring Databases by Using the SQL Server 2000 and SQL Server 2005 Tools.

Delete a subsite using the Delete This Site page
  1. On the subsite, click Site Settings.
  2. On the Site Settings page, under Administration, click Go to Site Administration.
  3. Under Management and Statistics, click Delete this site.
  4. On the confirmation page, click Delete.

To delete a subsite from the Manage Sites and Workspaces page, you must use the Site Settings page for the site immediately above the subsite you want to delete.

Delete a subsite using the Manage Sites and Workspaces page
  1. On the site above the subsite you want to delete, click Site Settings.
  2. On the Site Settings page, under Administration, click Manage Sites and Workspaces.
  3. On the Manage Sites and Workspaces page, next to the subsite you want to delete, click the Delete icon.
  4. On the confirmation page, click Delete.

Managing Sites and Subsites from the Command Line

You can use the following operations with the Stsadm.exe command-line tool to manage sites and subsites.

Operation Description
enumsites Lists all top-level Web sites for a specific virtual server (virtual server: A virtual computer that resides on an HTTP server but appears to the user as a separate HTTP server. Several virtual servers can reside on one computer. Each virtual server can have its own domain name and IP address.).
enumsubwebs Lists all subsites of a specific top-level Web site or subsite.
renameweb Renames a subsite.
deletesite Deletes a top-level Web site and any subsites beneath the top-level Web site.
deleteweb Deletes a subsite. If the subsite contains other subsites, an error will be returned, and the subsite will not be deleted.

You can also use the following operations to manage sites and subsites: createsite, creatsiteinnewdb, and createweb. For more information, see "Creating Sites and Subsites" in the Windows SharePoint Services Administrator's Guide.

The enumsites and enumsubwebs operations take the url parameter. Their syntax is simple, just the operation and URL, as in the following examples:

stsadm.exe -o enumsites -url <URL>
stsadm.exe -o enumsubwebs -url <URL>

The enumsites and enumsubwebs operations provide the list of sites and subsites as XML text. For example, a list of sites generated by running enumsites would look like:

<Sites Count="2">
<Site URL="http://site_name1" Owner="DOMAIN\userA"/>
<Site URL="http://site_name2" Owner="DOMAIN\userB"/>
</Sites>

The deletesite and deleteweb operations also take only the url parameter and follow the same syntax:

stsadm.exe -o deletesite -url <URL>
stsadm.exe -o deleteweb -url <URL>

The renameweb operation takes the url and newname parameters. The syntax for renameweb is as follows:

stsadm.exe -o renameweb -url <URL> -newname <new subsite name>

For more information about using the command-line operations, see Command-Line Operations.

Related Topics

Part of managing sites and subsites is creating sites when you need to. For more information, see "Creating Sites and Subsites" in the Windows SharePoint Services Administrator's Guide.

You can also delete unused sites automatically. For more information, see Managing Unused Web Sites.

 
 
Applies to:
Deployment Center 2003