MediaWiki version:
1.35
MediaWiki file: purgeExpiredWatchlistItems.php
Location: /maintenance/
Source code: master 1.40.0 1.39.4 1.35.11
Classes: Find code Find documentation

Template:MW file/noslash

Details

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.

Options

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).

Usage

php maintenance/purgeExpiredWatchlistItems.php
Terminal
$ php maintenance/purgeExpiredWatchlistItems.php

7 expired watchlist entries found.
All expired entries purged.

Common error

Watchlist expiry is not enabled.

An error is thrown if $wgWatchlistExpiry is not true. Set $wgWatchlistExpiry = true; to enable.

See also

  • $wgWatchlistExpiry
  • $wgWatchlistPurgeRate
  • $wgWatchlistExpiryMaxDuration
  • watchlist_expiry table
  • purgeExpiredWatchlistItems.php
  • Help:Watchlist expiry
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.