This extension allows administrators to perform a single edit across multiple pages in one step, by running a regular expression over the content of each page. This is well suited to performing simple edits such as renaming a template, adding pages to a category, or correcting typos (all of which can be done in the same edit operation by supplying multiple regular expressions.)
Release status: stable
|Implementation||Page action, Special page|
|Description||Use regular expressions to edit multiple pages at once|
|Author(s)||Adam Nielsen (Malvineoustalk)|
|Latest version||8.0.0 (2015-02-07)|
Translate the MassEditRegex extension if it is available at translatewiki.net
|Check usage and version matrix; code metrics|
§Usage[edit | edit source]
§Features[edit | edit source]
- New in version 8.0.0: Page iteration can be done on the client side, so PHP maximum execution time is no longer an issue when editing large numbers of pages.
- Transform each page using one or more regular expressions in a single step
- Edits appear as "bot" so they don't show up in the normal edit list (unless the user chooses to show bot edits)
- Only users with the masseditregex permission can perform changes
- A new 'edit all' tab appears on category pages and on Special:WhatLinksHere, for editing all listed pages at once
- Pages to edit can be specified as:
- A list of page names
- A list of page name prefixes (e.g. "Test" will match pages called "Testing" and "Tested")
- A list of categories (all pages within the categories will be edited)
- A list of backlinks (pages edited are those linking to the ones in the list)
§Installation[edit | edit source]
§Requirements[edit | edit source]
- MediaWiki 1.23 or newer.
- Familiarity with regular expressions.
§Download[edit | edit source]
The extension can be retrieved directly from Git [?]:
- Browse code
- Some extensions have tags for stable releases.
- Browse tags
- Select the tag
- Click "snapshot"
- Each branch is associated with a past MediaWiki release. There is also a "master" branch containing the latest alpha version (might require an alpha version of MediaWiki).
- Browse branches
- Select a branch name
- Click "Continue"
Extract the snapshot and place it in the extensions/MassEditRegex/ directory of your MediaWiki installation.
If you are familiar with git and have shell access to your server, you can also obtain the extension as follows:
cd extensions/ git clone
§Setup[edit | edit source]
Add the following to LocalSettings.php:
require_once ( "$IP/extensions/MassEditRegex/MassEditRegex.php" ); $wgGroupPermissions['sysop']['masseditregex'] = true; // Allow administrators to use Special:MassEditRegex $wgGroupPermissions['massedit']['masseditregex'] = true; // Create 'massedit' group where members can use Special:MassEditRegex without being sysops
§Bugs / Known Issues[edit | edit source]
- Server-side execution is the default as it (should) be faster. However editing large numbers of pages will cause server timeouts due to PHP limits on script execution time. To work around this (and perhaps to get better feedback on progress) you can tick 'execute in browser' to have the job tracking done on the client-side. This should mean timeouts are no longer a problem.