Help:Magic words

This is an index of Magic words used in MediaWiki.

#redirect
Indicates a redirect

Hides the table of contents.

Always show the table of contents.

Place the table of contents here. See also compact TOC

Hide the edit links.

__START__
__START__ does nothing, and it is considered a magic word only because it has an ID in MagicWord.php.

CURRENTMONTH
A variable.

July

CURRENTMONTHNAME
A variable.

July

CURRENTDAY
A variable.

29

CURRENTDAYNAME
A variable.

Monday

CURRENTYEAR
A variable.

2024

CURRENTTIME
A variable.

NUMBEROFARTICLES
A variable.

CURRENTMONTHNAMEGEN
A variable.

PAGENAME
A variable.

PAGENAMEE
A variable.

NAMESPACE
A variable.

MSG:
A template modifier. I.e.  shows

The use of msg has an effect when a template name clashes with a magic word. For example, if Template:CURRENTMONTHNAME contained "Test", then July would display "July" but would display "Test".

SUBST:
A template modifier. Replaces the reference to the template (e.g. ) with the content of the template.

''This article is a stub. You can help Wikimedia by expanding it.''

MSGNW:
A template modifier. Causes the template source to be pasted.

So outputs:

__END__
Allows for trailing whitespace to be deliberately included in the page save.

thumbnail
An image modifier.



right
An image modifier.



left
An image modifier.



none
An image modifier.



$1px
An image modifier.



center
An image modifier. Can also be spelled centre.



framed
An image modifier. Can also be spelled enframed or frame.



INT:
A special template. Used for UI messages.



SITENAME
A variable.

NS:
A special template. Gets the name of a given namespace number.



LOCALURL:
A special template. Gets the local URL of the given page.

results into

LOCALURLE:
A special template. Gets the local URL of the given page.

results into

SERVER
A variable. produces

GRAMMAR:
Useful for inflected languages to derive word forms. Usage:, cases in which this could be used depend on the specific language.

E. g. in Czech language, outputs Wikipedie, while  outputs Wikipedií.

__NOTITLECONVERT__
? Can also be spelled __NOTC__.

Same as below __NOCC__ but Article Title only.

__NOCONTENTCONVERT__
? Can also be spelled __NOCC__.

Don't perform the content language(character & phase) conversion in article display.(eg, Chinese zh with zh_cn, zh_tw, zh_sg, zh_hk)

CURRENTWEEK
A variable.

CURRENTDOW
A variable.

=Since v1.5=

CURRENTMONTHABBREV
A variable, returns the abbreviation of the current month.

July

FULLURL:, FULLURLE:
Special templates, give the full URL of the given page.

REVISIONID
Gives you the article or diff database

SCRIPTPATH
Returns $wgScriptPath

SERVERNAME
Returns $wgServerName

NUMBEROFFILES
Returns the number of uploaded files (rows in the image table).