Manual:purgeOldText.php
MediaWiki version: | ≥ 1.6 |
MediaWiki file: purgeOldText.php | |
---|---|
Location: | maintenance/ |
Source code: | master • 1.42.3 • 1.41.4 • 1.39.10 |
Classes: | PurgeOldText |
Details
[edit]purgeOldText.php file is a maintenance script located in the maintenance
directory that can be used to clean up unused text records.
It will remove from the text table any records which are not linked to any existing or archived revision.
Such orphaned text records should not exist during normal operation.
We would expect every record in the text
table to be linked from either a record in the revision
table or archive
table, and we would expect this script to find nothing to do.
However such records may be left behind after error scenarios or direct database manipulations.
This script will clean them up, and bring things into a consistent state, by deleting orphan text records.
The deleted data would not have been reachable.
It should have no noticeable impact on pages viewable by any users or administrators.
Because the text table contains the actual wiki page content data, it can occupy significant space, and purging unneeded records could help reduce the size of the database. Optimization of the MySQL text table is advisable after purging lots of text records.
Options/Arguments
[edit]Option | Description | Required? |
---|---|---|
--purge | Does the purge (otherwise only displays the number of orphaned text records). | Optional |
Usage
[edit]php maintenance/purgeOldText.php [ --purge ]
$ php maintenance/purgeOldText.php Searching for active text records via contents table...done. Searching for inactive text records...done. 0 inactive items found.
See also
[edit]- Purge
- DeleteArchivedRevisions.php - Script to permanently remove (all revisions of) deleted pages. After emptying the
archive
table, this also purges unneededtext
table records. - PurgePage.php