Manual:Orphans.php

Orphans.php is MediaWiki maintenance script that looks for 'orphan' revisions hooked to pages which don't exist and 'childless' pages with no revisions.