MediaWiki Citations and References

MediaWiki offers user-friendly syntax and tools for creating inline citations and reference lists. Learn how to effectively manage citations to enhance your wiki content.

<a href="">Image by fabrikasimf</a> en Freepik

How to win readers online

Quality of information is essential for winning readers online, as it helps to establish credibility and trust with the audience. In order to make readers choose your page over others, it is important to provide accurate, reliable, and relevant information on the topic you are discussing.

Creating authoritative content and avoiding plagiarism via sources

Citations and references play a crucial role as they back up the information shared in an article with evidence, enabling readers to check the content's accuracy and reliability. Additionally, they acknowledge the original sources of information, underscoring the importance of academic honesty and ethical standards.

Copying, stealing, or representing the ideas or words (or images or sounds) of another as one's own, without giving credit to the source, even unintentionally, is plagiarism and can turn what you think was a good text into a poor one.

How MediaWiki helps create trust

Mediawiki, the software used by Wikipedia, contributes to the concepts of trust and transparency providing tools for easily creating links, references and citations that allow readers to verify facts, and to explore the topic further if they desire. These tools help to make the global encyclopedia the largest and most-read reference work in history.

The implementation of tools varies depending on their purpose. In this post we are going to review the most common and modern solutions to help content creators.

The "Cite" extension

The "Cite" extension adds two parser hooks to MediaWiki:

  • allows editors to quickly add inline citations to specific parts of an article
  • creates a dedicated section containing references to all the sources used in the article.

MediaWiki article with references Wikipedia article with references

The extension is integrated into the VisualEditor toolbar. By default, it allows manual input of notes or references to sources, taking care about wrapping user input in tags. We have additional information about VisualEditor and how to use it. 

The Cite button in VisualEditor toolbar The Cite button in VisualEditor toolbar

If you prefer the MediaWiki source editor, you can add the Cite button to the editor interface using the RefToolbar gadget. 

The Cite button in source editor interface The Cite button in source editor interface

Re-usable references

The "Cite" provides a way to re-use sources within the same article by creating named references. Such references can be inserted in the text as many times as needed without repeating the reference content, only specifying the name of the reference:

MediaWiki reference name attribute example MediaWiki reference name attribute example

All occurrences of the named references are compacted into a single item in the references section.

VisualEditor toolbar offers a graphical interface for repeating references VisualEditor toolbar offers a graphical interface for repeating references

Grouped References

The references can be assigned a group to create a few references sections, for example:

  • Notes
  • References

Example of a notes and reference section Example of a notes and reference section

Guided input of the standardized reference elements

When your wiki has a lot of contributors, it is important to give editors hints about the reference structure, the order and format of elements, to ensure the consistency, completeness and professional look of references across the wiki. MediaWiki provides a system of templates that can be integrated into the VisualEditor as forms for the guided input of values to the predefined set of parameters.

Citation template selector in VisualEditor Citation template selector (VisualEditor)

Cite web template input formate input form Cite web template input formate input form

Please, note, that importing pages from Wikipedia requires some experience: pages are linked tightly and trying to export ten pages, one can end up with thousands of pages in a multi megabyte XML, dumped as dependencies to the initial set of pages. There can be a lot of Wikipedia specific pages that can produce errors on your wiki. The fastest and frictionless way to get the full featured reference system based on Wikipedia citation templates is to invite experienced professionals.

Citations templates are supported by wiki source editor via the RefToolbar gadget Citations templates are supported by wiki source editor via the RefToolbar gadget

For MediaWiki installations that use the source editor, there are external tools for the guided data input and the citation template markup generation, like MakeRef.

Automatic retrieval of MediaWiki citation sources

The functionality of the Cite can be extended to the degree when it is enough to provide a source identifier and MediaWiki will retrieve the full reference from the external sources. To implement the feature, you'll need the citoid node.js service that generates citation data given a URL, DOI, ISBN, etc. As a back-end it uses Zotero: the server uses so-called “translators” to automatically detect journal articles, library records, news items, and other objects and import data. There are currently more than 600 different translators, facilitating data import from countless sites.

Source ID input box for Citoid Source ID input box for Citoid

If VisualEditor is not enabled, there are external tools that can be used for the automated retrieval of citation sources, for example this Citation Template Filling page.

The "CiteThisPage" extension

This tool allows editors to generate citations for the current MediaWiki page in a variety of citation styles (APA, MLA, Chicago, BibTeX, etc.) by clicking on a link located in the standard MediaWiki Toolbox menu. 

Special page providing references to the MediaWiki page in a variety of citation styles Special page providing references to the MediaWiki page in a variety of citation styles


In the course of creation of this blog post, we discovered a nice technique allowing creation of a citation template entry for any page in the Internet. It uses "bookmarklets" - pieces of Javascript that can be saved as your browser bookmarks. When you click on the bookmark, the script will generate the reference code for the current page and a set of buttons to play with the format of dates, author names, or even to save some predefined values in the browser storage, so they will be re-used for references to the current site.

WebRef interface WebRef interface

How to create a citation bookmarklet

Add a new bookmark in your browser and put the following code into the URL field:

d.body.append Child(s);

WARNING - Use this code with caution. The code can be changed at any time by the Author.

Whenever you want to cite a page, click on the bookmark and get the citation code.


MediaWiki provides a simple syntax and easy to use tools for creating inline citations and lists of references. There are many external citation tools that can generate MediaWiki compatible code. MediaWiki can automatically format citations and references according to a variety of citation styles, re-use and group references, making it easy for editors to create consistent, correctly-formatted citations. This makes MediaWiki an efficient tool for creating and maintaining large collections of references and citations.

We have many other blogs to help you become a MediaWiki Expert!

Latest Stories

Here’s what we've been up to recently.

Get our stories delivered

From us to your inbox weekly.