Open main menu


This page is a translated version of the page Extension:ShortUrl and the translation is 9% complete.
Other languages:
Deutsch • ‎English • ‎dansk • ‎español • ‎français • ‎português • ‎português do Brasil • ‎русский • ‎עברית • ‎中文 • ‎日本語
MediaWiki extensions manual
OOjs UI icon advanced.svg
Release status: stabil
Implementation Special page
Beskrivelse Adds a special page that redirects to an article based on the given base36-encoded ID
Forfatter(e) Yuvi Panda
Latest version 1.2.0 (2015-01-29)
MediaWiki 1.25+
Database changes Ja
Licens BSD 3-clause "Modified" License
Translate the ShortUrl extension if it is available at
Check usage and version matrix.
Issues Open tasks · Report a bug

ShortUrl is a special page extension that helps create shortened URLs for wiki pages, using their base36 encoded IDs. Adds a 'Short URL' link to the Toolbox. Primarily developed for use in the Indic Language Wikipedias.


  • Download and place the file(s) in a directory called ShortUrl in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'ShortUrl' );
  • Run the update script which will automatically create the necessary database tables that this extension needs.
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

To users running MediaWiki 1.24 or earlier:

The instructions above describe the new way of installing this extension using wfLoadExtension(). If you need to install this extension on these earlier versions (MediaWiki 1.24 and earlier), instead of wfLoadExtension( 'ShortUrl' );, you need to use:

require_once "$IP/extensions/ShortUrl/ShortUrl.php";


  1. When installed redirects are available under Special:ShortUrl/<base36>.
  2. Links to redirects can be found in the Toolbox and under the heading (JavaScript only)


  1. (Optional) Run populateShortUrlTable.php maintenance script. Fills the shorturl database table with entries for all namespace/title parts of all currently existing articles.
  2. Set $wgShortUrlTemplate to the template of the path for generating short URLs. $1 is replaced with the actual short URL ID.

Se også