MediaWiki Page Changes and Edits Tutorial - How to track changes and patrol edits

How to track changes and patrol edits in MediaWiki

In MediaWiki users can keep track of the changes performed to pages and also to other changes such as user creation, change of user rights etc. On a wiki website many people can add and edit pages and respectively there are many changes that are made. So by keeping track of these changes other users can make additional alterations or corrections, if necessary.

In this tutorial we'll also go over patrolled edits. In MediaWiki patrolled edits, also referred to as patrolling, is also a concept related to keeping track of changes. It's the same as approving edits. It's a way for users who have the permissions to patrol edits and to see patrolled edits to distribute the workload of checking all the new edits. In this way new edits are not check many times by different users and so users can save a lot of time.

For general information on the basic tasks related to pages (e.g. adding, editing, deleting, redirecting, etc.) check the tutorial on how to manage pages in MediaWiki.

In this tutorial we'll go over:

The exact location on the screen of the different buttons and links that we've mentioned in the tutorial depends on the particular theme. As an example we've used the Vector theme that comes prepackaged with MediaWiki.

Track Changes with the Recent Changes Page

In MediaWiki there are pages known as special pages. They display various information about the site and are also used to manage different things. One of these pages is called Recent changes; it tracks and lists all the changes made on the site. To access it, click on the Recent changes button on the left:

Button for Accessing the Recent Changes Page

Alternatively, you can also click on Special pages in the Tools menu on the left and on the page that opens click on Recent changes in the section Recent changes and logs.

On the page that opens the changes are grouped according to the day on which they were made. The most recent changes are listed at the top:

List with Changes on the Recent Changes Page

Above the list with the changes there are some options with which you can manipulate the list:

Filtering Options on the Recent Changes Page

By clicking on the respective number after Show last you can select how many of the most recent changes should be shown, or by clicking on the respective number for days you can choose to view the changes performed in the last specified number of days (e.g. in the last 30 days). You can also choose to hide from the list some of the changes based on different criteria; for example, you can hide your own edits, minor edits, edits made by registered users, etc. You can also select the pages from which namespaces should be shown. By default all changes on the pages from all namespaces are shown; you can select to view for example only the changes to user pages.

There's a legend that explains some of the symbols used in the list. For instance, the capital N means that it's a newly created page; the green number in the brackets shows with how many bytes the edit changed the page size as compared to its previous version before the edit, etc.

The Recent changes page lists not only revisions in terms of the content of pages, meaning editing existing or adding new pages, but it also lists changes from the various logs; for example, deleted, restored, moved pages, etc. The most common changes are those for editing the content of existing pages (and for adding new pages). Let's review in more details the available buttons and links in such an item in the list.

Item on the List of the Recent Changes Page

For each revision in the list you'll find the following elements:

  • diff and hist buttons - in brackets at the beginning of the line you'll see these two buttons. The diff button will open a new page that displays the differences of the revision of the page as compared to the previous edit. If it's a new page the button will be disabled since there's no previous revision. With the hist button (short for history) you'll see the history of the page; that is a list of all the revisions made to the particular page. On the page with the revision history you can compare each revision of the article with any other of its revisions. For the latest edit there's also an undo button with which you can undo it.

  • page title - after the buttons for the history and differences between the revisions is the page title. It's a link that will open the page and from there if you want to, you can edit it. Sometimes exactly in front of the page name there's an additional symbol that provides some information about the edit/revision. These symbols are explained in the legend at the top of the page. For example, if the user belongs to a group (e.g. administrators) for which the patrolled edits feature is enabled, and the page revision hasn't been patrolled yet, there will be a red exclamation mark in front of the page title.

  • revision time - after the page title you'll see the time when the edit was performed.

  • page size change - in brackets and colored in green you'll see how the size of the page has changed after the edit. For example, (+56) indicates that the page after the revision is bigger with 56 bytes, while (-56) indicates that it's smaller in size with 56 bytes.

  • links related to the user (username, talk, contribs, block) - there are a few links related to the user who made the revision/contribution. This includes the username, which is also a link to the personal wiki page of the user, a link to the talk page associated with the user's page, a link to a page that shows all the contributions/revisions made by the user, and a link for blocking that user (by default available only to administrators). If the user is not a registered one, then instead of the username you'll see the IP address of the user.

  • Optionally, there might be some additional information after the user links. For example, if the user provided a summary of the edit, it will be shown italicized and in brackets. If the change is not a revision of the page but some other action (e.g. redirect, deletion), then there will be some additional information related to that (e.g. the page to which the redirect points).

As we mentioned, the Recent changes page lists not only revisions of the content of pages, but also other tasks performed to pages, such as moving pages, deleting, redirecting. The format in which such an entity is listed on the Recent changes page is similar. At the beginning of a line for such a change you'll see link to the log associated with the action (e.g. deletion log); clicking on it will show you all such actions.


In MediaWiki there are logs that keep track and list all the administrative actions performed to pages, and also some actions related to users. These logs don't track the changes to the content of pages but such things as moving/renaming pages, deleting, protecting, patrolling, merging, importing. There are also logs for the creation of user accounts, changing the user rights, blocking users and uploading files.

To access the logs, click on Special pages in the Tools menu on the left, then on the page that opens click on the Logs button in the section Recent changes and logs:

Accessing the Logs

On the page that opens you'll see a list of the changes in all the logs. Using the options at the top of the page you can filter the displayed changes. You can, for example, select a particular log and/or choose to see the changes performed by a particular user and during a specified time period:

Page Displaying the Logs

If you configure any of the filter options don't forget to click on the Go button.

In the list with the changes you'll see the user who made the change, the performed action and the page(s) or user to which it was made.

Track the Creation of New Pages

When there's a new page added you can check that along with the other changes on the Recent changes page. However, there's a special page that's specifically intended as a list only of newly created pages. To go to that page, click on the Special pages button in the Tools menu on the left, on the following page select New pages in the section Recent changes and logs:

Accessing the Page that Lists New Pages

This will display a list of the newly created pages and some filtering options above it:

Page that Lists New Pages

With the filtering options you can display new pages only from a particular namespace within the site or those created by a particular user. You can also hide those created by registered users, by bots and the pages that have been patrolled.

In the list for each page you'll see the date and time it was created, its name, the username of of the user that created the page (or the IP address if they are not registered), links to the talk page and the other contributions of the user. If you are logged in as an administrator, or a user from another group that can see and manage patrolled edits, you'll see marked with yellow background those new pages that have not been patrolled. For more information on patrolling edits check the section in this tutorial on patrolling.

Check All the Revisions of a Page

If you want to view the history of a page, i.e. all the revisions made to the page, open the page and click on the View history button that's in the top right corner:

Button for Viewing the History of a Page

On the page that opens you'll see the revision history of the page. The changes are listed chronologically with the most recent at the top. Above the list there are some filtering options:

Revision History of a Page

With the filtering options you can view the revisions made during a specified time period.

In the list with the revisions at the beginning of the line for each revision there are buttons cur and prev. With the cur button you can compare the particular revision with the most recent one, and with the prev button you can compare it with the previous one. If you want to compare any two revisions of your choice, mark the radio button for each of the revisions and click on the button Compare selected revisions. The time the revision was performed is a link that shows the page as it looks with that revision. As usual, the username of the user who made the change is shown, as well as links to their talk page and contributions. After that in the line you'll see in brackets the current size of the page and how it's different as compared to the previous revision. At the end of the line if there's a summary about the revision, it will be shown in brackets and italicized. If the revision is some action like redirecting or moving, it will be specified also in brackets and italicized.

The history of a page can also be accessed from the Recent changes page. For each change in the list there's a hist button that links to the revision history of the page on which the listed change was performed.

Track the Contributions of a User

It's possible to track and view a list of all the changes made by a specific user. The changes made by users are usually referred to as contributions. There are different ways you can get to the page that lists the contributions of a user.

On any page that lists changes and revisions, such as the Recent changes page or the logs, the username (or the IP address for unregistered users) of the user who made the change is shown. Right next to it there's a contribs link which displays a page with the contributions of the user. If the contribution is by an uregistered user there will be no such button; instead you can view the contributions of that visitor by clicking on the IP address.

Button for Viewing the Changes Made by a User

A basic way in which you can view the contributions of any user is to click on the Special pages button in the Tools menu on the left, on the page that opens click on the User contributions link in the Users and rights section:

Accessing the User Contributions Page

On the page that opens in the text field that's provided type the username (or IP address) of the user and click on the Search button. This will display a list of the contributions of that user:

Searching and Viewing the Contributions of a User

You can use the available search options to filter the contributions that are shown based on different criteria (e.g. time period, latest revision, etc.).

Track Page Changes with a Watchlist

Another way you can track changes to particular pages of your choice is with the help of a MediaWiki feature called a watchlist. This is a list of pages that displays all changes to the pages that you've added to this list. In this way you can more easily track the changes to specific pages that are of interest to you.

Note that by default only registered users can create and use a watchlist.

There are several ways you can add a page to a watchlist and respectively to remove it. The most common one is when you access the page to use the button for adding/removing the page to the watchlist. The button is in the top right corner and looks like a star. When the page is not on the watchlist, the star is blank (meaning it's not colored inside):

Button for Adding/Removing the Accessed Page to/from the Watchlist

If the page is already added to the list, the star will be filled with color and clicking on it will remove the page from the list.

On the various forms (e.g. for editing, deleting, moving, etc.) there's also a checkbox for adding/removing the page that's being edited to/from the watchlist.

To access and manage your watchlist, after you log into your account click on the Watchlist button in the upper right corner of the screen. This will show a list of the changes to the pages on the watchlist:

Watchlist Page

For a more detailed review of the watchlist feature check out the tutorial on how to create and manage a watchlist in MediaWiki.

Patrol Edits

In MediaWiki there's something referred to as patrolling. It's related to checking new edits to pages; this also includes checking the creation of new pages. You'll also see this feature called patrolled edits. To patrol an edit is basically to view it and make sure it's acceptable. It is generally the same as approving the edit. When it comes to patrolling newly created pages and the revisions of existing pages there's a specific button to mark the page as patrolled.

It's a way of making sure that all the content that's added is viewed and checked, and if necessary, corrections can be made to that content. On the one hand, it makes it easier to spot which revisions have been checked or made by a trustworthy user, and on the other, it distributes the task of doing this to all users who have the permission to use this feature.

Edits that haven't been patrolled are specifically marked, but note that only users who are allowed to patrol edits see this. Other users are not aware of this and cannot see it. Keep in mind that edits that haven't been patrolled are not hidden from users. For example, if a new page has been added or some text has been added to an existing page, they will be visible to all users regardless of whether these changes have been patrolled. To patrol edits, doesn't mean to make them accessible to others; it simply means that users who are allowed to use this feature see indications of which new edits have been checked by a trustworthy user and can check and mark the ones that haven't been checked.

By default, in MediaWiki 1.5 and newer versions only administrators can patrol edits and see which edits haven't been patrolled. In version 1.9 and newer ones, they are also the only users that have their own edits automatically marked as patrolled.

Here we'll go over how to mark edits and newly created pages as patrolled, how to give users the permission to patrol edits and how to disable/enable the feature for the whole site.

  • First we'll review how to mark the revisions of existing pages as patrolled. On pages that list changes, such as the Recent changes page or your watchlist, edits that haven't been patrolled are indicated with a red exclamation mark in front of the name of the page. To mark the page as patrolled first click on the diff button for that page:
Diff Button for Edits

This will open the page for comparing the revision with the previous one. Click on one of the two available buttons Mark as patrolled:

Buttons for Marking an Edit as Patrolled

This will remove the indication that the edit hasn't been patrolled.

  • Now let's go over how to patrol a newly created page. This is done in a slightly different way than patrolling the revision of an existing page. First you have to access the page. As you know, in MediaWiki there's a special page that lists newly added pages. To open it, click on the Special pages button in the Tools menu on the left, on the page that opens click on the New pages button in the Recent changes and logs section. On the list that's shown new pages that haven't been patrolled are indicated with a yellow background color:
Page that Lists New Pages

You can access the page by clicking on its title. Then below the content of the page itself click on the button Mark this page as patrolled:

Button for Marking a Newly Created Page as Patrolled

Newly added pages that have not been patrolled are also indicated on the Recent changes page, but there they are shown in the same way as the other edits: with a red exclamation mark in front of the title. There's no yellow background color.

  • Next lets' review how to give permission to user groups to use the patrolling function.

There are two user rights related to patrolling; one is labeled patrol and it means that the user group that has this right can patrol the edits of others. In MediaWiki versions newer than 1.5 only administrators (also called sysops) are allowed by default to patrol pages. In older versions it's enabled for all users. A user who can patrol edits can't patrol their own revisions. For this purpose there's another permission; it's labeled autopatrol and it means that when users who have that right make revisions to pages, these revisions are automatically marked as patrolled. By default, in MediaWiki versions newer than 1.9 only administrators have that permission. To see what the current permissions are for the existing user groups, go to Special Pages in the Tools menu on the left, on the page that opens click on the User group rights button in the section Users and rights.

You have the choice to give the patrol right to an existing user group. This means that all users in that group will be allowed to patrol edits. If you want only specific users to be able to do that, you can create a new group with the patrol right enabled, and then you can assign users from an existing group to that new group. A user can belong to more than one group. Such a user has the permissions of all groups to which they are assigned.

In both cases this is done with a line of code inserted in the LocalSettings.php file of your MediaWiki. To add the patrol right to a group, you have to insert the following line:

$wgGroupPermissions['group-name']['patrol'] = true;

Replace group-name with the actual name of the group. If you want to add the permission to an existing group, just put the name of the group. For example:

$wgGroupPermissions['user']['patrol'] = true;

will give the patrol right to the user group. That's the default group to which all registered users belong, and so in this case all registered users will be able to patrol pages. MediaWiki comes preconfigured with a few other user groups. As we mentioned you can see them listed if you go to Special pages>User group rights on the frontend. The label for the group of the bureaucrats that you can use in the code is bureaucrat, while for administrators its sysop. For all users, unregistered and registered, it's the symbol *.

If you decide you want to create a new user group with the patrol right, use the same code but simply put the name of the new group in the respective position. For example:

$wgGroupPermissions['patrol_users']['patrol'] = true;

will create the group patrol_users that will have the patrol permission. If the name of the group consists of more than one word don't leave spaces between them; you can separate them with underscores or hyphens. Then you can assign users to that group. All registered users belong to the basic user group by default and can't be removed from there. So every user that you add to the new group will have the rights of the regular registered users plus the patrol right of the new group. This is convenient if you want only specific users to be able to patrol edits.

If you want to add the autopatrol right to a user group, it's done in the same way. Only replace in the code the label for the right:

$wgGroupPermissions['group-name']['autopatrol'] = true;

Put the line with code on a new line at the end of the LocalSettings.php file. The file is in the root folder of your MediaWiki. So, for example, if MediaWiki is installed directly in the public_html directory on your MediaWiki hosting account, then the path to it will be public_html/LocalSettings.php. One way to edit the file is to download it with an FTP client (e.g. FileZilla), edit it with a text editor (e.g. Notepad) and then upload it back. HostKnox clients can also do that directly on the hosting account from the Files section of the HostKnox control panel. It can also be done via SSH.

  • Now let's see how to disable patrolling for the whole site. By default, patrolling is enabled. If you don't want to make use of this feature, you can completely disable it. You can do this by inserting some code in the LocalSettings.php file of your MediaWiki. There are a couple of options for that. To disable the patrolling of revisions of existing pages insert the following line at the end of the file:

$wgUseRCPatrol = false;

If you want to disable patrolling of newly created pages, put the following on a separate line:

$wgUseNPPatrol = false;

Note that if the second option (wgUseNPPatrol) is disabled but the first one is enabled, then patrolling will work both for edits of existing pages and for newly created pages. If the first option is disabled and the second is enabled, then patrolling will work only for newly created pages.

In case you want to enable again any of the two options either replace false with true or delete the line completely.

Links to Tutorials on Pages

When it comes to pages we have one general tutorial on pages and a few others: