Manual:DeleteArchivedRevisions.php

Deletes all the archived (deleted from public) revisions, by clearing out the archive table.

Prior to MediaWiki 1.16, a helper file deleteArchivedRevisions.inc contained the class that performs the work. This class was merged into deleteArchivedRevisions.php in 1.16.

The standard version of this script fails if mediawiki is using sqlite as sqlite appears to not support the TRUNCATE verb. To fix this modify the line:

$dbw->query( "TRUNCATE TABLE $tbl_arch" );

to:

$dbw->query( "DELETE FROM $tbl_arch" );

This should be efficient as there is a 'truncate optimisation' for this form of DELETE statement.