title: Restoring SharePoint Welcome / Home Page to Default
body: <p>I have a <code>SharePoint</code> site that has not content yet. All I have done is create a feature that applies my own custom styling (via <code>visual studio</code>). I was experimenting with some of the features of <code>SharePoint</code> and somehow seem to have removed the content of the welcome page. </p>
  
  <p>Here is what the page looks like now: </p>
  
  <p><a href="https://i.stack.imgur.com/iQiQo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iQiQo.png" alt="enter image description here"></a></p>
  
  <p>Here is what it used to look like (I found this on google images so the styling of course doesn't match mine, but you get the idea of the kind of content that used to be there):</p>
  
  <p><a href="https://i.stack.imgur.com/Red0u.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Red0u.png" alt="enter image description here"></a></p>
  
  <p>This is the code from the <code>FeatureActivated</code> function that caused this change (I was trying to change the welcome page):</p>
  
  <pre><code>foreach (SPWeb web in siteCollection.AllWebs) {
      var root = web.RootFolder;
      if (root != null)
      {
          root.WelcomePage = @"Layouts/AccessFolder/HomePage.aspx";
          root.Update();
      } 
  
      //set master page (custom styling)
  }        
  </code></pre>
  
  <p>How do I revert these changes becuase currently I cannot even add web parts when I try to edit the page. Is it just a cas eof running that same code again but changing the <code>WelcomePage</code> URL? If so how do I find out what the original master page is called. </p>
  
  <p>Note: I do not have access to <code>SharePoint Designer</code>.</p>