Stable unique identifiers for your wiki pages
Reference your pages with UUIDs or PURIs
On this page
Overview Usage documentation Installation Configuration
External links
Reference your wiki pages with stable, unique identifiers that remain unchanged even when pages are renamed, moved, or deleted and restored.
Each page automatically receives a unique persistent ID upon creation. You can configure the format of your IDs.
The extension generates UUID v7 IDs. Future versions might add support for other ID types, such as nanoid-style IDs. UUIDs (Universally Unique Identifiers) are 128-bit numbers represented as 32 hexadecimal digits separated by hyphens. Example: 123e4567-e89b-12d3-a456-426614174000
You can access the identifiers via the page information tab (action=info), parser functions, and the REST API.
To display a page's persistent identifier within the page content, use the parser function
{{#ppid:}}
.
Get persistent identifiers via the REST API by MediaWiki page ID:
GET /persistent-page-identifiers/v1/pages?ids=123|456
{
"identifiers": {
"123": "00000000-0000-0000-0000-000000000042",
"456": "00000000-0000-0000-0000-000000000043"
}
}
For wikis with existing pages that were created before installing this extension, you can generate persistent identifiers using the maintenance script:
php maintenance/GenerateMissingIdentifiers.php
The script will only generate identifiers for pages that don't already have one, processing them in batches for optimal performance.
Platform requirements:
Install the extension using Composer:
COMPOSER=composer.local.json composer require --no-update professional-wiki/persistent-page-identifiers:~1.0
composer update professional-wiki/persistent-page-identifiers --no-dev -o
Enable the extension by adding the following to your LocalSettings.php:
wfLoadExtension( 'PersistentPageIdentifiers' );
You can verify the installation by checking your wiki's Special:Version page.
If you already have wiki pages, you probably want to generate IDs for them.
Persistent Page Identifiers only has optional configuration. Change configuration via LocalSettings.php.
This format affects how identifiers are displayed everywhere in the extension, including the page information tab, parser function output, and API responses.
$wgPersistentPageIdentifiersFormat = "$1"; // Default value
The
$1
placeholder is replaced with the persistent ID.
Example usage:
$wgPersistentPageIdentifiersFormat = 'https://example.com/id/$1';
// Becomes something like https://example.com/id/123e4567-e89b-12d3-a456-426614174000
$wgPersistentPageIdentifiersFormat = 'wiki_$1';
MediaWiki services by the authors of this extension
Get superior results from the best MediaWiki developers with a proven track record of creating MediaWiki extensions & integrations.
Explore Mediawiki DevelopmentMake your wiki look great! Use a time-tested responsive MediaWiki theme, or have us create a custom MediaWiki skin for you.
Style Your WikiLet us take care of your wiki. We are MediaWiki hosting experts and provide cloud hosting, dedicated hosting, and on-premise hosting.
Find the Perfect Wiki Hosting PlanBring your wiki to the next level by leveraging our MediaWiki expertise. From strategic planning to wikitext, we have you covered.
Explore Our Consulting ServicesMigrate your wiki with confidence. We move your MediaWiki to a new home, or we help you migrate from another system to MediaWiki.
Migrate Your WikiKeep your MediaWiki up-to-date and secure. We offer MediaWiki maintenance services to keep your wiki running smoothly.
Secure & Update Your Wiki