Manuel:DeleteOldRevisions.php

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:DeleteOldRevisions.php and the translation is 38% complete.

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎português • ‎português do Brasil • ‎čeština • ‎日本語

Détails

Le fichier deleteOldRevisions.php est un script de maintenance permettant d'effacer toutes les anciennes versions (non-actuelles) à partir de la table des versions de la base de données. The script works on old, non-deleted revisions (which are stored in the revision table). The script deletes all old, non-deleted revisions from the revision table and then invokes purgeOldText.php to purge the text records which no revision links to. C'est utile pour réduire la taille de la base de données mais cela veut aussi dire perdre la capacité de restaurer les versions correspondantes.

Le script peut être limité pour retirer les anciennes versions de pages spécifiques, au lieu d'agir sur toutes.

This script does not remove any deleted revisions (which are stored in the archive table)! Use the maintenance script deleteArchivedRevisions.php to delete all rows from the archive table.

This script deletes page histories. You need to be aware that there are licenses, which require you to keep the page histories. E.g. you may not delete old revisions, if you run a GFDL licensed wiki.

Utilisation

Deleting all old revisions:

php maintenance/deleteOldRevisions.php --delete

Deleting all old revisions from specific pages (page id 1, 2, 15 and 38):

php maintenance/deleteOldRevisions.php --delete 1 2 15 38


Options

Option/Parameter Description
list of page ids Performs the deletion only on the page ids (numbers) given as unnamed arguments.
--delete Actually performs the deletion. Otherwise the script will only display the number of items that it can delete.

Voir aussi