Change landing home page in SharePoint

InfoPath alternatives for form designing SharePoint

This is an article will tell you how to change landing home page of SharePoint into a custom page which you designed or developed by your own. This will help you when you create a project for the client and deliver to them. It is very easy to change the home page as you desire.

When exporting and importing sites throughout SharePoint 2010 that are upgraded sites from SharePoint 2007, you probably noticed that the homepage for the imported site is defaulted to SharePoint 2010’s wiki-style page at /SitePages/Home.aspx.

Step 1:
Open->Start->All programs ->Microsoft Sharepoint 2010 products ->

Step 2:
Open ->Sharepoint 2010 Management Shell -> Run as Administrator ->

Step 3:
provide cd <Space> “C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN”

Step 4:
Place the following code in the PowerShell to change welcome page of SharePoint.

If you’re a SharePoint administrator, you can use a Windows PowerShell script to select a master page

Below is a script I created that will prompt to enter in the Web Application and Welcome Page and then loop through each site in the Web Application and set the Welcome Page. Save this as a .ps1 file and run it from the SharePoint 2010 Management Shell:



if there are spaces in your .aspx page file name, then simply type spaces (i.e. you don’t need to include the url encoded %20 for spaces). For example, you could change the line above to:

$assignment=Start-SPAssignment

$web=Get-SPWeb -Identity “https://sharepoint:1000” -AssignmentCollection $assignment

$rootFolder=$web.RootFolder

$rootFolder.WelcomePage= “SitePages/CPITHome.aspx”

$rootFolder.Update()

Stop-SPAssignment $assignment

$web.Update()

$web.Dispose()

Stop-SPAssignment $assignment

Step 5:
Go and check the homepage landing in the site.

Method 2:
If the publishing features are enabled for a site then
else
– Open > Site Settings -> Site Collection Administration
– Select ->Site Collection Features
– check -> SharePoint Server Publishing Infrastructure -> active

– Open > Site Actions ->Manage site feature
– Activate -> SharePoint Server Publishing feature
– Now check
Open > Site settings -> Welcome Page




Step 1: Site Actions, Site Settings, Welcome Page
Step 2: Change the URL
Method 3:
SharePoint 2010 gives you an easy way to change the default homepage when users hit your site. In order to set one of your custom pages as the default homepage, you can go to that page and click on the “Make Homepage” button in the ribbon under the “Page” tab in the “Page Actions” category.

Open SharePoint designer.
Step 1: Create custom welcome page
Step 2: Right-click the new page and click “Set as Home Page”

Method 4:
Step 1: Open Visual studio
Step 2: Create SharePoint project
Step 3: connect to the site using code as given below

using (SPSite oSiteCollection = new SPSite(“http://MyServer/sites/MyWikiSite”))
{
SPWeb oWebsite = oSiteCollection.OpenWeb();
SPFolder oFolder = oWebsite.RootFolder;
oFolder.WelcomePage = “My Wiki Library/MyWelcome.aspx”;
oFolder.Update();
oWebsite.Dispose();
}

Step 4: Now deploy the code and see the changes in the welcome page.

These are a different way of changing the welcome page in SharePoint 2010 and also SharePoint 2013 version.


Read SharePoint 2013 tutorials:

Hope this article is useful for you.


You May Also like the Following SharePoint Online Tutorials:

About jayabharathi

The turning point in the process of growing up is when you discover the core of strength within you that survives all hurt.

View all posts by jayabharathi →

Leave a Reply