Manual:cleanupPreferences.php
MediaWiki version: | ≥ 1.20 |
MediaWiki file: cleanupPreferences.php | |
---|---|
Location: | maintenance/ |
Source code: | master • 1.42.4 • 1.41.5 • 1.39.11 |
Classes: | CleanupPreferences |
Details
editcleanupPreferences.php file is a maintenance script to delete user preference values which are hidden by $wgHiddenPrefs , or those that are unknown (e.g. were added by a since-uninstalled extension).
It contains the DeleteUnknownPreferences hook.
Options/Arguments
editOption | Description | Required? |
---|---|---|
--dry-run | Print debug info instead of actually deleting | Optional |
--hidden | Drop hidden preferences ($wgHiddenPrefs ) |
Optional |
--unknown | Drop unknown preferences (not in $wgDefaultUserOptions or prefixed with "userjs-" )
|
Optional |
Usage
editphp maintenance/run.php cleanupPreferences [ --dry-run| --hidden| --unknown ]
Terminal
$ php maintenance/run.php cleanupPreferences --unknown Dropping unknown preferences... ..doing 4 entries DONE! (handled 4 entries)
In MediaWiki version 1.39.10 and earlier, you must invoke maintenance scripts using
php maintenance/scriptName.php
instead of php maintenance/run.php scriptName
.