How to change the default number of edit entries on the Recent changes page in MediaWiki
As you know, the Recent changes page in MediaWiki displays a list of the recent changes on the site, such as page edits, user account creation, etc. By default, when a user opens the page the 50 most recent changes are listed on the page. With the options at the top of the page the user can expand the list to view older entries.
Registered users can also select from their account settings a different default number. So that, for example, when they are logged in and they open the Recent changes page it will automatically display let's say the most recent 70 edits. To do this the user has to log into their account, click on the Preferences button (with most skins its in the top right corner), then on the page that opens select the Recent changes tab and edit the option Number of edits to show by default. As we mentioned, it's set to 50 for all users.
In this article we'll also show you how to change the general default option for the number of edits for the whole site. This means that it affects all anonymous users and all registered users who haven't explicitly changed their account option for the number of edits shown on the Recent changes page.
The default user options for the site are set in the file DefaultSettings.php. You can change the value for an option by adding a line to the LocalSettings.php file. Let's say that you want the default number of edits shown on the Recent changes page to be 20. Then you have to add the following on a new line at the end of the LocalSettings.php file:
$wgDefaultUserOptions['rclimit'] = 20;
To set a different number simply replace 20 with whatever number you want. As we mentioned, if a registered user has edited their account setting for the number of edits on the Recent changes page, this change to the general option for the site will not affect them. Anonymous users and registered users who haven't changed their personal option will be affected, but registered users can still change the number of edits on the page by changing their respective account preference option.
The LocalSettings.php file that you have to edit to change the default option is in the root MediaWiki folder on your MediaWiki hosting account. If, for instance, the application is installed directly in the public_html directory (making the URL of the site yourdomain.com), then the path to the file on the account will be public_html/LocalSettings.php. HostKnox customers can use the File manager of the Pixie control panel to view and edit files directly on the account. Another way is to download the file on your local computer, edit it with a text editor (e.g. Notepad) then upload it back overwriting the old file. Files can also be edited on the account via SSH.
For general information on the Recent changes page check out the tutorial on how to track changes and patrol edits in MediaWiki and in particular the section on the Recent changes page.
You may also find useful our other articles related to the Recent changes page:
- how to change the available options for the number of entries to be listed on the Recent changes page in MediaWiki
- how to change the available options for the period for which entries can be listed on the Recent changes page in MediaWiki
- how to change the period for which changes are kept on the Recent changes page in MediaWiki
- how to rebuild the Recent changes list in MediaWiki