Lua scripting

Lua is supported as a scripting language in all Wikimedia Foundation sites (since March 2013), via the Scribunto extension. Lua modules are maintained in the Module: namespace; you can see recent changes to Lua modules in English Wikipedia, for example. See also the tutorial and the reference manual.



Templates and ParserFunctions were introduced to allow end users of MediaWiki to replicate content easily and build tools using basic logic, effectively turning wikitext into a limited programming language.

However, complex templates have caused performance issues and bottlenecks.

This project aims to make it possible for MediaWiki end-users to use a proper scripting language that will be more powerful and efficient than ad-hoc ParserFunctions-based logic.

See also Scripting, Extension:Scribunto.

The example of Lua's use in World of Warcraft (WoW) is promising; even novices without any programming experience were able to make large changes to their graphical experiences by quickly learning some Lua.

<marktraceur> hashar, sumanah, also Minetest ( has recently implemented a similar system, though it mods the server more than the client, from what I've seen it's driving people to learn Lua so they can add in their ideas, something not possible with C++
<hashar> sumanah: the secret of WoW is that they managed to expose an API which is very easy to understand
<YuviPanda> hashar: heard of Celestia? It's a planaterium software of sorts. Uses Lua for scripting. When I was in 9th grade, me and (also!) everyone around were able to learn and use it without much of a problem at all.

Open tasksEdit

Product tasks
  • Where are the lists of templates that need to be converted? Help wikis gather those lists, and link to them on this page. For instance, English Wikipedia lists its Lua requests here. Or help create those lists by using to find wikitext templates that currently parse slowly and thus would be worth converting to Lua.
  • Improve the "getting started" part of the Lua reference manual in response to novice developers' requests.
  • Spread the word about available reference material (such as that linked to in the blog post).


Lua modules on this wikiEdit

See alsoEdit