Wiki Farms
Explanation
A wiki farm is several wikis served by a single XWiki instance, and the Wiki Application that ships with XWiki is where each of them is created, configured and deleted. The same arrangement is also called multi-tenancy, multi-wiki or farm mode, and the older xwiki.virtual.* configuration properties call it virtual mode.
A farm is a performance choice before it is anything else. One XWiki instance on a machine performs far better than several instances on that same machine, and known XWiki farms hold several hundred to several thousand wikis on a single instance. MyXWiki, the free wiki hosting XWiki SAS offers to individuals and non-profits, is one of them. Those are the sizes that have been run rather than the sizes to aim for: towards the thousands it is the time to create a wiki and to upgrade the farm that becomes the limit, which Wikis vs Nested Pages weighs against keeping the same content in nested pages.
One instance means one JVM and one servlet container, but not one place to keep the content. Every wiki of the farm has its own schema, or its own database, in the DBMS the instance is connected to, and which of the two it gets depends on the DBMS. Wiki Farm Requirements says what each supported database does, and what the instance needs before a second wiki can be created.
Nothing has to be switched on to get there. Multi-tenancy is built into XWiki, so a freshly installed instance is already a farm holding its main wiki alone, and adding a subwiki to it is an operation in the Wiki Application rather than a change to the instance's configuration.
Because one instance answers for every wiki, XWiki has to match each incoming request to one of them: it reads the wiki from a segment of the URL's path, or from the host name the request arrived on when the URL carries no such segment. Wiki URL Resolution gives both algorithms and the properties that configure them, which Switch to Domain-Based URLs and Change the Wiki Path Segment change.
FAQ
Can a wiki be added to an instance that was installed as a single wiki?
Yes. The one thing to settle first is in Wiki Farm Requirements: the database user XWiki connects as has to be allowed to create the schema or the database that the new wiki will use.
Can the wikis of a farm run different XWiki versions?
No. A farm is one installation and one set of jars, so every wiki in it runs the same XWiki version. Wikis that have to run different versions need separate instances.
Is a subwiki the same thing as a nested page?
No, and choosing between them is a content-organization decision rather than an infrastructure one. Wikis vs Nested Pages compares the two.
More
To find more about the current topic, you can search or use the table below and filter the columns to narrow your choices.