How to Restore a Deleted SharePoint IIS Site
August 7, 2012
Has your SharePoint site gone missing from IIS Server altogether? In this tutorial, Fpweb.net SharePoint Engineer Joe Beyer walks through the process of restoring a SharePoint site that has been deleted from IIS.
Just the other day, I was presented with an issue that I am actually surprised does not surface more often. The IIS site associated with my SharePoint site was accidentally deleted.
Now, I know if it were the Central Administration site, that we could re-provision that using psconfig.exe command(s). But it’s a little different for a missing SharePoint site.
I first realized the site was deleted when I was greeted with the following message when attempting to browse to said site:
Although the site is no longer visible though IIS, the Virtual Directory path (
%SystemRoot%/inetpub/wwwroot/wss/VirtualDirectories/) still remains in the file system. I attempted to add a new site via IIS by using the same name and pointing to the Virtual Directory as shown here:
Once the new site was created, I attempted to browse to the site once again and received an HTTP 404 error. Once this failed, I deleted the newly created IIS site to continue further troubleshooting. At this time, I started thinking that an environment restore would be necessary. Wanting to avoid a restore at all costs, I decided to attempt to extend the Web Application using the same URL’s as the root site collection. This is all done through Central Administration.
*Before extending the Web Application, I went in to the virtual directory path and copied the respective path to create a backup copy.
- Browse to Central Administration > Application Management > Manage Web Applications.
- Highlight the appropriate Web Application and click on Extendlocated on the Ribbon bar:
- On the Extend Web Application to Another IIS Web Sitepage, enter the same name as the IIS site was previously. For Host Header, enter a unique value, but similar to the previous URL. For this example, these values are as follows:
- Click OK.
When this is complete, you should now be able to browse to the site. When extending the Web Application, SharePoint will attempt to locate the appropriate IIS site. If the site does not exist (which is the case here), it will recreate it.
Now that the IIS site exists once again, I can now successfully browse to the site and it appears just how I left it!
Questions? Comments? Feel free to leave your thoughts below & I will try to respond quickly. Thanks for reading!