Jump to content

Small wiki toolkits/Starter kit/AbuseFilter

From Meta, a Wikimedia project coordination wiki
AbuseFilter tutorial video for beginners (2020, 100 minutes, including examples)

This page explains how you can use filters on your wiki in order to block bad edits and actions.

General information[edit]

Sometimes users make bad page edits (for example: vandalism). Some of those edits have some patterns in common, and you want to automatically block these patterns. This is possible with theAbuseFilter extension.It is installed on all Wikimedia wikis.

AbuseFilter allows you to define filters. The filters automatically check every edit that is made on your wiki. The filters also check other actions like account creation or page moves.

A filter has two parts: Rules and actions. When an edit matches conditions in a rule, then actions are performed.

The filter will also log the edit. The filter can also disallow the edit, tag the edit summary, warn the editor,block the editor,remove the editor's autoconfirmed status, remove alluser groupsfrom the editor, and/orblock a group of IP addresses.

Global filters[edit]

Some bad edit patterns are common across all wikis. That's why there areglobal filters.Global filters are enabled on all small wikis by default. You cansee the list of global filters on meta.Global filters can also be enabled on non-small wikis ifa wiki community requests it.

Per-wiki filters[edit]

In addition to global filters, there can also be individual filters for each wiki. You can see the current filters of your wiki on the pageSpecial:AbuseFilter.

By default, onlysysops(also calledadministrators) can create or edit local filters on your wiki. You can find the list of sysops on your wiki by going to the pageSpecial:ListUsers/sysopon your wiki. If your wiki has no local sysops, then you can contact theglobal Abuse filter maintainer groupfor help, orglobal sysops. After a while you could alsorequest to become a local sysop on your wiki.

In order to learn how you can define rules and actions for filters, see the links underExtension:AbuseFilter#Creating and managing filters.To write more complex filter rules, it is helpful to knowregular expressions.

To test filter rules without referring to a specific edit, use the pageSpecial:AbuseFilter/toolson your wiki. To test filter rules on some specific edits, use the pageSpecial:AbuseFilter/teston your wiki. When your filter rules do what they should, you can create the filter on the pageSpecial:AbuseFilter/newon your wiki.

Toimport a filterfrom another wiki, use the pageSpecial:AbuseFilter/importon your wiki.

If you need access to the data in the edit filter logs, contact theAbuse filter helpers global group.

The exactAbuseFilter permissions (groups and block duration) for each wiki are also public.Your wiki community canrequest to change these permissionsif needed.

Help[edit]

If you need help with writing a filter, you could ask onmw:Extension talk:AbuseFilteror maybew:en:Wikipedia:Edit filter/Requested.Please always explain which problem you want to solve on which wiki.