I understand that MediaWiki cannot have subwikis, rather custom Namespaces would be the closest one could get (source).

In order to test this I created a Namespace as per Manual:Using custom namespaces#Creating_a_custom_namespace.

Despite pages like Help:Namespaces, Extension default namespaces, Manual:Configuration_settings#Namespaces, and Manual:Using custom namespaces, I cannot seem to get my head around it…

Therefore, here are my questions:

  1. Where/how can I find the Namespaces that exist?
  2. How can I create pages/articles that are under the newly created Namespace?
  3. How can the users see the pages/articles put under a certain Namespace?
  4. Is it possible to have all the users having read access to pages/articles created in a Namespace, but having only some of them with editors/contributors rights?

Technical details:

  • MediaWiki: 1.34.0-alpha (95b9bef) 2019-05-20T06:46:02
  • PHP 7.2.18 (apache2handler)
  • MySQL 5.6.43-log
  • ICU 62.1
  • Elasticsearch 6.7.0

2 Answers 2

  1. One way is to go to a special page such as Special:AllPages and check the namespace selector dropdown.
  2. Just create a normal page whose name starts with the namespace name.
  3. As above. From the user point of view, namespaces are more or less just title prefixes.
  4. Yes, see $wgNamespaceProtection for one method that does not require any extensions.

Q1. On search results, Advanced, you can see a list of all existing namespaces. Alternatively, the LocalSettings.php file will define any additional/custom namespaces. See $wgExtraNamespaces. The namespace manual states the built-in namespaces, but you can also look at the code for a page and find the ns_ number/word eg NS_USER_TALK. See here for namespaces with their numbers.

Q2. Once a namespace is created (which just involved setting the LocalSettings.php value) users just create the pages by typing the namespace at the top, e.g Movies:Daphne's day out (2020) then press enter. (Similar to creating a new Help page or template)

You may want to consider renaming a default namespace or rather using an alias e.g. Project. This can also be done in LocalSettings.php

Q3. Uses can view them once they exist, but for users to be able to search for them you set the name space to be searchable - see $wgNamespacesToBeSearchedDefault. Set $wgContentNamespaces to include the namespace contents in page counts, long pages, short pages etc.

Q4. Namespaces can also be restricted if you choose, eg read only to unconfirmed users. This can be set on a group level if you want, as stated by Tgr.

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