Jump to: navigation, search

Other languages:
català • ‎Deutsch • ‎English • ‎español • ‎suomi • ‎français • ‎italiano • ‎日本語 • ‎Nederlands • ‎polski • ‎português • ‎português do Brasil

Details[edit | edit source]

deleteArchivedRevisions.php file is a maintenance script to delete all the archived (hidden from public view) revisions, by clearing out the archiveManual:Archive table table. These revisions will no longer be restorable. The pages are permanently deleted.

When a page is 'deleted' by an administrator (Help:Sysop deleting and undeleting), records are moved from the 'revision' table to the 'archive' table, although the bulk of the data (page text) remains in the 'text' table. The script deletes all records from the archive table and then invokes purgeOldText.phpManual: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.

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

Usage[edit | edit source]

php deleteArchivedRevisions.php [--conf|--dbpass|--dbuser|--delete|--globals|--help|--memory-limit|--profiler|--quiet|--server|--wiki]

Generic maintenance parameters[edit | edit source]

Option/Parameter Description
--delete Does the deletion (otherwise only displays the number of revisions to delete).
--help (-h) Display the scripts help message.
--quiet (-q) Suppresses all non-error specific output.
--conf Specifies the location of LocalSettings.phpManual:LocalSettings.php if not stored in the default location.
--wiki Specifies the wiki ID. Useful in situations where multiple wikis are deployed.
--globals Outputs the globals at the end of processing for debugging purposes.
--memory-limit Sets a specific memory limit for the script, "max" for no limit or "default" for no change.
--server The protocol and server name to use in URLs, e.g. This is sometimes necessary because server name detection may fail in command line scripts.
--profiler Set to "text" or "trace" to show profiling output.

Script dependent parameters[edit | edit source]

Option/Parameter Description
--dbuser The database user to use for this script.
--dbpass The database user's password to use with this script.