Our requirement is to deploy a public site and community we created from the sandbox to the production org.

If we have to create a new community and public site, we will have to make changes in the page links that are available on the public site.

Is there a process to deploy a public site and community without creating new ones in the production org?

  • Public Force.com sites can be deployed using metadata type CustomSite - see answer
    – cropredy
    Mar 13 at 22:10

1 Answer 1


Not as far as I know.

To keep a Site working in multiple orgs, grab information from the Site class rather than hard-coding. For example:

Returns the URL path prefix of the current site or an empty string if none. For example, if the requested site URL is http://myco.force.com/partners, then /partners is the path prefix. If the current request is not a site request, then this method returns an empty string.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .