Thread:Project:Support desk/Unauthorized Users/reply (4)

No, this will only remove their user accounts; it will not change any posts.

There is a script deleteBatch.php, which allows you to delete a group of pages.

To use it, follow the description on Manual:deleteBatch.php. You will need an SQL query, which creates a list of all pages, which you want to delete. If you do not have legitimate changes in between, you can just pick all pages newer than a certain date and time. You can get information about these pages with an SQL query like this one:

SELECT page_id, page_namespace, page_title FROM /*prefix*/page WHERE page_touched > '20130213000000';

You can also add an end date/time by using a slightly different WHERE clause like so:

SELECT page_id, page_namespace, page_title FROM /*prefix*/page WHERE page_touched > '20130213000000' AND page_touched < '20130213235959';

If you configured a table name prefix when you installed MediaWiki, you need to replace /*prefix*/ above with it.

After running deleteBatch.php you can run the maintenance script DeleteOrphanedRevisions.php to make sure the content in your wiki is in consistent state. It will delete all revisions of the deleted pages.

Note that I have not tried the above and if used incorrectly it might break your wiki. Make sure you have a working backup!