Manual talk:DeleteArchivedRevisions.php

Equivalent SQL
As the code looks currently, this script is pretty simple and I'm fairly confident that it is equivalent to running these two SQL queries. This may be handy for anyone without SSH access to a server.

Note that this can run very slowly. I set this running to remove tens of thousands of spam text records, and my server was hung for over an hour while it ran.

Actually the more complex purging process (the second query) is not really within this script class. This script just invokes function PurgeRedundantText in Maintenance.php. This will actually check the archives table too, to avoid deleting text records referenced there. But since we know that this table is now empty, I've simplified the query a little. A more full SQL translation (which would run even slower) would be this:

Another alternative for people stuck with no SSH access. Extension:Maintenance or Extension:MaintenanceShell -- Harry Wood (talk) 20:50, 7 October 2012 (UTC)


 * Hello, Harry. I used the method proposed. The database tables were cleared, but it did not change anything. Deleted pages are still on the site. (MediaWiki	1.20.2) --AdSer8 (talk) 16:38, 20 November 2013 (UTC)
 * These are pages which have been deleted by sysop delete action (Help:Sysop deleting and undeleting) correct? "Deleted pages are still on the site" what d'you mean by that exactly? -- Harry Wood (talk) 19:23, 20 November 2013 (UTC)