From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png

Release status:Extension status stable

ImplementationTemplate:Extension#type Search
DescriptionTemplate:Extension#description Provides a title prefix search suggestion backend
Author(s)Template:Extension#username Brion Vibber (Brion VIBBERtalk)
Latest versionTemplate:Extension#version continuous updates
MediaWikiTemplate:Extension#mediawiki 1.17+
Database changesTemplate:Extension#needs-updatephp Yes
TablesTemplate:Extension#table1 titlekeyExtension:TitleKey/titlekey table
LicenseTemplate:Extension#license GNU General Public License 2.0 or later
Hooks usedTemplate:Extension#hook

Translate the TitleKey extension if it is available at translatewiki.net

Check usage and version matrix.


Open tasks · Report a bug

The TitleKey extension provides a case-insensitive title prefix search. It uses a separate table for the keys, so if it works cleanly it can be deployed without an expensive rebuild of core tables, and dumped when Wikimedia gets a nicer backend through MWSearch extension.

For the average site administrator, the benefit of this extension is that it allows search suggestions (e.g. from Opensearch API) to be case-insensitive.

This extension provides no benefit if you are using CirrusSearch.[1]

Installation[edit source]

  • Download and place the file(s) in a directory called TitleKey in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
require_once "$IP/extensions/TitleKey/TitleKey.php";
$wgEnableMWSuggest = true; #Not needed if using MediaWiki 1.20+
  • Run the update script which will automatically create the necessary database tables that this extension needs.
  • Run the rebuildTitleKeys.php script (this requires command-line access):
php extensions/TitleKey/rebuildTitleKeys.php
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Troubleshooting[edit source]

If you put, e.g., require_once( "/home/stauffenbergssh/extensions/TitleKey/TitleKey.php" ); you might get "Failed opening required '/home/stauffenbergssh/extensions/TitleKey/../../maintenance/Maintenance.php'"". To fix it, you would put a copy of the Titlekey directory under your wiki extensions folder (rather than in an extensions folder outside of webroot).

Notes[edit source]

  1. TitleKey does provide benefit if your wiki has redirects that cross from one namespace into another, and you want these redirects to show up in the wiki search box as auto-suggestions. CirrusSearch does not support prefix search for cross-namespace redirects, but TitleKey will make them work. See ticket T146678.
Language:Project:Language policy English  • français