top of page

What are MediaWiki Namespaces, Categories, Pages, and Sub-Pages

What are Namespaces?

Namespace are a high-level collection of pages having special purpose and specific behavior. Mediawiki offers separate namespaces for main content, uploaded files descriptions, user pages, system messages, categories, templates, support content (help pages and project pages), system reports and tools. Namespaces can be searched separately, user permissions to access and edit pages can be fine-tuned by namespace. The important idea behind namespaces isto tell the main content from the auxiliary one. For example, if you create manuals for your wiki editors, it would be a good idea to place them into the “Help” namespace, so readers will not find these pages in search results by default. One can easily recognize the namespace of the current page by prefix, eg:

  • Category:Manuals” – page “Manuals” in the Category namespace (includes all available manuals);

  • Help:Manuals” – page “Manuals” in the Help namespace (contains the list of available manuals);

  • Help:How to start a new page” – a single manual page in the Help namespace;

  • Template:Manual” – page “Manual” in the Template namespace (contains structure, layout and other parameters for all manuals);

  • File:Manuals.jpg” – page “Manuals.jpg” in the File namespace (contains a description for the uploaded file with the same name);

Pages with the main content are stored in the unprefixed “Main” namespace:

  • “Manuals” – the article about manuals.

Each namespace – except the “Special” namespace containing system reports and tools – has associated “Talk” namespace allowing to discuss the content of the subject page:

  • Help:How to start a new page” – a subject page;

  • Help_talk:How to start a new page” – a page to discuss the content.

Extensions can define their own namespaces, for example:

  • Widget:Manual” – page “Manual” in the Widget namespace provided by the Widgets extension (in this namespace, unlike in default MediaWiki namespeces, the use of raw HTML, CSS and Javascript is allowed).

Administrators can configure custom namespaces for the purposes of your particular wiki.

Example of Main namespace article
Example of Main namespace article

Template namespace page
Template namespace page

File namespace page example
File namespace page example