A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:DeleteOldRevisions.php below:

Manual:deleteOldRevisions.php - MediaWiki

deleteOldRevisions.php file is a maintenance script to delete all old (non-current) revisions from the revision table in the database. 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. This can be useful for reducing the size of the database but it does mean you lose the ability to restore the according revisions.

The script can be limited not to remove old revisions of all pages, but to only remove old revisions of specific pages.

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.

Option/Argument Description Required? <page_id> Performs the deletion only on the page ids (numbers) given as unnamed arguments. Optional --delete Actually performs the deletion. Otherwise the script will only display the number of items that it can delete. Optional
php maintenance/run.php deleteOldRevisions [ <page_id>| --delete ]

In MediaWiki version

1.39.13

and earlier, you must invoke maintenance scripts using

php maintenance/scriptName.php

instead of

php maintenance/run.php scriptName

.

Deleting all old revisions:

Terminal

$ php maintenance/run.php deleteOldRevisions --delete

Delete old revisions

Searching for active revisions...done.
Searching for inactive revisions...done.
13 old revisions found.
Deleting...done.
Searching for active text records via contents table...done.
Searching for inactive text records...done.
0 inactive items found.

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

Terminal

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

The page ID of a specific page can be retrieved by accessing the page information .


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4