Manual:purgeExpiredWatchlistItems.php
MediaWiki バージョン: | ≧ 1.35 |
MediaWiki ファイル: purgeExpiredWatchlistItems.php | |
---|---|
場所: | /maintenance/ |
ソース コード: | master • 1.43.0 • 1.42.5 • 1.39.11 |
クラス: | コードを検索 • 説明文書を検索 |
詳細
purgeExpiredWatchlistItems.php is a maintenance script that deletes expired rows from the watchlist and watchlist_expiry database tables.
This script should be run periodically, for example, by a cron job.
The recommended periodicity is once or twice a day, to account for users on different timezones.
For improved site performance, $wgWatchlistPurgeRate
can be set to 0.
オプション
This script doesn't have any of its own parameters, and the most useful of the generic parameters is probably --batch-size
, which determines how many rows will be deleted on each run (defaults to 500).
使用法
php maintenance/run.php purgeExpiredWatchlistItems
Terminal
$ php maintenance/run.php purgeExpiredWatchlistItems 7 expired watchlist entries found. All expired entries purged.
MediaWiki バージョン 1.39.10 以前では、メンテナンス スクリプトを
php maintenance/run.php scriptName
ではなく php maintenance/scriptName.php
を使用して実行する必要があります。
よくあるエラー
- Watchlist expiry is not enabled.
An error is thrown if $wgWatchlistExpiry is not true. Set $wgWatchlistExpiry = true;
to enable.