Available from version 1.15.0
When a message page is changed. Useful for updating caches.
Define function:
public static function onMessageCacheReplace( $title, $text ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"MessageCacheReplace": "MyExtensionHooks::onMessageCacheReplace"

For MediaWiki ≤1.25:

$wgHooks['MessageCacheReplace'][] = 'MyExtensionHooks::onMessageCacheReplace';
Called from:File(s): cache/MessageCache.php

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:MessageCacheReplace extensions.


  • $title: name of the page changed.
  • $text: new contents of the page.