{"id":2855,"date":"2011-08-05T07:40:10","date_gmt":"2011-08-05T07:40:10","guid":{"rendered":"http:\/\/jellywp.com\/theme\/entron\/demo5\/?p=2855"},"modified":"2011-08-05T07:40:10","modified_gmt":"2011-08-05T07:40:10","slug":"converting-a-site-to-a-site-collection","status":"publish","type":"post","link":"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/converting-a-site-to-a-site-collection\/","title":{"rendered":"Converting a site to a Site collection"},"content":{"rendered":"<p><strong>Creating a site collection from site<\/strong><\/p>\n<p><strong>1.<\/strong> Below I am creating a new database since my site is a publishing site I will be creating a blank publishing site.<br \/>\nCreate a new site in its own DB using the below cmstemplate<br \/>\na. $w=Get-SPWebApplication(&#8220;http:\/\/shareptapptest:9002&#8221;)<br \/>\nb. New-SPContentDatabase &#8220;WSS_Content_Internet_Hosted_Sites_3&#8221; -DatabaseServer &#8220;shareptDBtest&#8221; -WebApplication $w<br \/>\nc. new site: here I am creating a blank publishing template which cannot be created from UI<br \/>\nNew-SPSite http:\/\/shareptapptest:9002\/hostedsites -OwnerAlias testdomain\\testadmin -Name &#8220;SITENAME&#8221; -Template &#8220;cmspublishing#0&#8221;<\/p>\n<p><strong>2. <\/strong>Export the site http:\/\/shareptapptest\/hostedsites\/SUBSITE:<br \/>\nstsadm -o export -url http:\/\/shareptapptest\/hostedsites\/SUBSITE -filename &#8220;C:\\Deployments\\Release2-Technical Upgrade\\SUBSITE06142011.bak&#8221;<\/p>\n<p><strong>3.<\/strong> Making sure all site collection and subsite features\\spolutions are activated on the new site collection<br \/>\na. Make sure all solutions are activated for this site collection as well.<br \/>\nb. Or what you can do is also make sure that all the features that are activated on the source are activated on this site collection as well.<\/p>\n<p><strong>4.<\/strong> Import the exported data using the below command.<br \/>\nstsadm -o import -URL http:\/\/shareptapptest:9002\/Hostedsites -filename &#8220;C:\\Deployments\\Release2-Technical Upgrade\\SUBSITE06142011.bak&#8221;<\/p>\n<p><strong>5. <\/strong>Potential Issues:<br \/>\na. when I tried to run the website it bombed out because I think it could not find the master page.<br \/>\nb. The master gallery exists only on the site collection level so a site might be pointing to the site collection&#8217;s master page in which case, when it is exported out the master page, will not be exported.<br \/>\nc. Also, the publishing images library which is \u201cimages\u201d is usually in the site collection so all images pointing to this will not be visible.<\/p>\n<p><strong>6. <\/strong>to copy the MASTER PAGE: Open 2 instances of SPD, 1 for each website, Copy the master pages from SUBSITE using Sharepoint Designer, copy the 2 master pages from the &#8220;MAster PAges&#8221;<\/p>\n<p><strong>7. <\/strong>This is used to fix the page layout, if you see the layout of the pages in the document library in SP Designer you will see that the page layout is still pointing to the old server&#8217;s page layout. Below command will fix the page layout<br \/>\na. install gary extensions using the below commands<br \/>\ni. Download them from the internet, do a search for Gary Lapointe extensions and you will find them.<\/p>\n<p>Add-SPSolution C:\\Deployments\\Release2-Technical Upgrade\\Lapointe.SharePoint2010.Automation.wsp<br \/>\nInstall-SPSolution -Identity Lapointe.SharePoint2010.Automation.wsp -GACDeployment<\/p>\n<p>stsadm -o gl-repairsitecollectionimportedfromsubsite -sourceurl http:\/\/mossappdev10:9006\/hostedsites\/chphc -targeturl http:\/\/mossappdev10:9005\/hostedsites<\/p>\n<p style=\"text-align: center;\"><strong>OR<installing and Of what you can do is that instead of installing and running these commands, in SPD Deattach and Reattach the page layout and if it refers to the page layout on the same server then it is fixed.\n\n<strong>8. <\/strong>For any images missing fix the hardcoded references to this SITE when it was the subsite.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Creating a site collection from site 1. Below I am creating a new database since my site is a publishing site I will be creating a blank publishing site. Create a new site in its own DB using the below cmstemplate a. $w=Get-SPWebApplication(&#8220;http:\/\/shareptapptest:9002&#8221;) b. New-SPContentDatabase &#8220;WSS_Content_Internet_Hosted_Sites_3&#8221; -DatabaseServer &#8220;shareptDBtest&#8221; -WebApplication $w c. new site: here I [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-json\/wp\/v2\/posts\/2855"}],"collection":[{"href":"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-json\/wp\/v2\/comments?post=2855"}],"version-history":[{"count":0,"href":"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-json\/wp\/v2\/posts\/2855\/revisions"}],"wp:attachment":[{"href":"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-json\/wp\/v2\/media?parent=2855"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-json\/wp\/v2\/categories?post=2855"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-json\/wp\/v2\/tags?post=2855"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}