Wikipedia:High-risk templates
![]() | This page documents an English Wikipedia editing guideline. It is a generally accepted standard that editors should attempt to follow, though it is best treated with common sense, and occasional exceptions may apply. Any substantive edit to this page should reflect consensus. When in doubt, discuss first on the talk page. |
![]() | This page in a nutshell: High-risk templates and Lua modules may be fully protected or template protected. Edits to such pages should be infrequent. |
Following the Wikipedia:Protection policy, page protection may be indefinitely applied to all templates, template redirects, and Lua modules that have been identified by the community as being of high risk to Wikipedia. If fully protected, so that they can only be edited by administrators, or template-protected, so that they can only be edited by administrators and template editors, these pages should be edited cautiously, and consensus should be established for any changes that might be controversial. If semi-protected, templates and modules may be edited by any established user, but users should ensure there is consensus for their edits and avoid edit wars.
The most common reasons a template or module is considered high-risk are:
- It is used in a permanently highly visible location, and it isn't cascade protected.
- It is transcluded into a very large number of pages.
- It is substituted extremely frequently by multiple users on an ongoing basis (for example, templates used to warn users about inappropriate editing).
There are generally no fixed criteria, and no fixed number of transclusions, that are used to decide whether a template or module is high-risk; each page is considered separately. If a template or module relates to a biography of a living person, that would strengthen any arguments in favor of its preemptive protection. Note that a bot automatically template-protects pages with over 5000 transclusions and semi-protects pages with over 500 transclusions, and that a 2018 RfC identified rough consensus to permanently semiprotect templates with at least around 200-250 transclusions.
Rationale
The risk of vandalism is increased for a template or module that is transcluded many times or is shown on high-visibility pages such as the Main Page. The fact that numerous readers would see an edit to these pages provides an incentive to vandalize them and also magnifies the damage done by such an act. There have also been cases where well-meaning editors introduced an error to a template that broke millions of pages.
Although this kind of vandalism is reverted very quickly (often within one minute), it might be seen by thousands of viewers before it is removed; protection lowers this risk. An additional risk is that, before the vandalism is fixed, some of the pages may have their caches updated, and these may stick around for a long time after the vandalism is fixed. Because experience has shown that vandalism to templates is often performed from multiple autoconfirmed accounts, full protection or template protection may be required to prevent abusive editing.
Documentation and padlock
Semi- and fully protected templates should normally have the {{Documentation}}
template. It loads the unprotected /doc
page, so that non-admins and IP-users can edit the documentation and categories. It also automatically adds {{pp-template}}
to protected templates, which displays a small padlock in the top right corner and categorizes the template as a protected template. Only manually add {{pp-template}}
to protected templates that don't use {{Documentation}}
(mostly the stub templates).
The bottom of protected templates should usually look like this:
<!--Last line of the template code--><noinclude>
{{Documentation}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
This process is not necessary for Lua modules, as the documentation from the module's /doc subpage is automatically shown on the main module page.
Relevant discussions
- Wikipedia:Village pump (proposals)/Archive 145#A proposal to permanently semi-protect the Template space
- Wikipedia:Requests for comment/Extended confirmed protection policy 2#High-risk templates
See also
{{Edit fully-protected}}
– Placed on a talk page to request an edit of the corresponding fully protected page.{{Edit template-protected}}
– Placed on a talk page to request an edit of the corresponding template protected page.{{Edit semi-protected}}
– To request that other editors update a page, for users that are not logged in or are too new to edit a semi-protected page.{{High-use}}
– Placed on a template to indicate it is a high-risk template.- Wikipedia:Requests for page unprotection
- Wikipedia:List of indefinitely protected pages#High use templates – An incomplete list of templates protected per this guideline.
- Wikipedia:Database reports/Templates transcluded on the most pages – historical reference
- Wikipedia:Cascade-protected items – A page which cascade-protects many widely used templates and files.
- Wikipedia:Template editor – Describes the template editor user right, and has some notes on the level of discussion required for different types of edits.