Manual:purgePage.php

From Linux Web Expert

Revision as of 01:20, 30 March 2022 by imported>Jayprakash12345 (Marked this version for translation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<td class="mw-version-versionbox" title="<translate nowrap> The latest stable version is <tvar name=1>1.41</tvar></translate>">
<translate> ≥</translate> 1.30
<translate> MediaWiki version:</translate>

Details

purgePage.php file is a maintenance script to purge both internal and external caches.

This is the equivalent to action=purge (<translate> task <tvar name=1>T169195</tvar></translate>) and performs the following actions:

  • Re-parses the wikitext, saves changes to the database (e.g. current expansion of magic words and templates, writes links to the database for images, links-here, categories etc.).
  • Performs a database write for page.page_touched to the current time, which has potential cascading effects to other areas of the application.
  • Purges the page's canonical URLs from File cache ($wgUseFileCache ) and/or from external Squid/Varnish proxy (this is the part that purgeList.php does).
  • In addition, individual page types (such as FilePage) and extensions, may register additional actions. For example, when purging a File page, it also deletes thumbnails from Swift storage, and purge the URLs of all thumbnail sizes and variations (page1, page2, 120px, 320px etc. etc.)
File:OOjs UI icon notice-destructive.svg <translate> Warning:</translate> If using file cache, it is important to run this script as the same user as mediawiki (or your web server) runs as. Otherwise the script might not have filesystem rights to delete filecache entries

Options/Arguments

Option Description Required?
--skip-exists-check Skip page existence check <translate> Optional</translate>

Usage

php maintenance/purgePage.php [ --skip-exists-check ]


Give a list of page titles to purge, one per line, from standard input:

Terminal


Give a list of page titles to purge, one per line, from a file:

Terminal

where purge.txt contains a list of pagenames to be regenerated.

See also