Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Purging all pages in mediawiki

Is it possible to purge all pages in mediawiki? I've tried emptying the obejctcache table to no avail. I don't particularly want to hit each page with ?action=purge appended. Version 1.23.3

like image 528
user3791372 Avatar asked Sep 01 '14 01:09

user3791372


1 Answers

You can either

  1. Use the maintainance script PurgeList.php like this: php purgeList.php --purge --all, for MW > 1.21, and php purgeList.php --all-namespaces for MW > 1.34. Really old MW versions do not have the --all option, so you will need a list of pages.

  2. Use the API: API:Purge, and feed it with a list of all pages (that you can get from API:Allpages)

  3. Invalidate all caches by setting $wgCacheEpoch to the current time in LocalSettings.php, e.g. $wgCacheEpoch = 20140901104232;.

  4. Set $wgInvalidateCacheOnLocalSettingsChange (since MW 1.17) to achieve pretty much the same thing. Only do this if your wiki has low to moderate traffic.

  5. Not sure if this is a good idea, but if you have access to the wiki's database you should also be able to achieve the same effect by truncating the table objectcache.

like image 54
leo Avatar answered Oct 21 '22 21:10

leo