In our SP2010 publishing site we have a lot of content (publishing pages) which are associated with custom page layouts. These page layouts have previously been edited on the server using SharePoint Designer, which we believe means they are now stored in the content database - which we understand is referred to as being "unghosted".

We are now trying to do a deployment of a package which includes new versions of these page layouts. The deployment appears to work; the new page layouts are stored on the filesystem, but do not actually get used because SharePoint prefers to use the ones already in the content database instead.

We have tried deleting the page layouts using SharePoint Designer (so the newly deployed ones on the filesystem get used), but we can't because there is lots of content using them.

We would like to be able to disassociate the existing content from these page layouts so we can delete the page layouts from the content database (using SPD) and deploy the new, packaged versions of the page layouts to the filesystem (and never edit the page layouts in SPD again!).

Is this approach possible? If not, any ideas on a different approach which doesn't require us to delete all our content first, as there is lots of it!


2 Answers 2


If you want to deploy using a wsp, you could add a feature receiver which makes sure the page layouts are updated when you deploy them.

This blog post has an example of using a feature receiver to checkout, update and publish a change to a page layout: http://falakmahmood.blogspot.com/2011/09/sharepoint-2010-updating-masterpages.html

This would enable you to update the page layouts in a controlled manner while the content is still attached.


Are those pagelayout initially created in SharePoint Designer? If so, make sure that you remove the SharePoint Designer metatags (available in the page directives) before you place them in Visual Studio for provisioning. Those metatags are evil. They ensure that the pagelayout will be "unghosted" after provisioning!

That said, I think provisioning of another WSP is a little bit overkill. You can easily reset your pagelayouts (make them ghosted again) - by right-clicking them in SharePoint Designer and select "Reset to site definition" OR by using the UI. SiteAction -> Look and feel-> Reset to site definition

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.