Wiki source code of Clone an XWiki Instance

Last modified by Eleni Cojocariu on 2026/08/12 16:44

Show last authors
1 To copy an XWiki instance (the source) into a separate, independent instance (the target):
2
3 1. [[Back up>>Documentation.AdminGuide.Backup]] the database and the [[permanent directory>>documentation.xs.admin.configuration.directories.permanent-directory.WebHome]] of the source instance.
4 1. Restore them on the target instance, excluding the ##xwikiid## database table so that the target keeps its own [[instance id>>documentation.xs.dev.instance.get-instance-id.WebHome]].
5 1. Copy the [[configuration files>>documentation.xs.admin.configuration.WebHome]] ##xwiki.cfg## and ##xwiki.properties## from the source instance to the target instance.
6 1. Review every uncommented setting of both files and replace the values that name the source's environment, such as a domain name or the address of a third-party service. [[Authentication>>documentation.xs.admin.authentication.WebHome]] settings are the exception:(((
7 * Keep the target instance's own authentication settings in ##xwiki.properties##, instead of copying the source's.
8 * Re-apply the authentication settings stored on the wiki, through the Administration or on a configuration page as the [[OpenID Connect authenticator>>extensions:Extension.OpenID Connect.OpenID Connect Authenticator.WebHome]] supports: the restore brings back the source's values, and wiki-stored settings win over ##xwiki.properties## when both are set.
9 )))
10 1. Start the target instance and log in. If the restored authentication settings prevent that, enable the [[superadmin account>>Documentation.AdminGuide.Security||anchor="HSuperadminaccount"]] and correct them from inside the wiki.
11 1. Edit the ##XWiki.XWikiServerXwiki## page and set its "Alias" property to the domain name of the target instance.(((
12 {{image reference="xwikiserverxwiki-alias.png" size="large" alt="The Alias field of the wiki descriptor form of the XWiki.XWikiServerXwiki page, outlined" /}}
13 )))
14 1. Check whether you have configuration to review: every extension that connects to an external service, (the [[mail sending>>extensions:Extension.Mail.MailApplication]] settings, for example, may still hold the source's values and need updating for the target's environment; if you use [[paid extensions>>https://store.xwiki.com/xwiki/bin/view/Main/]], you may also need to reload their license for the target instance).
15 1. Check the target instance in a browser: it answers on its own domain name, it serves the content of the source instance, and it still reports its own [[instance id>>documentation.xs.dev.instance.get-instance-id.WebHome]].

Get Connected