Membership Membership:
Latest New User Latest: vpros
Past 24 Hours Past 24 Hours: 0
Prev. 24 Hours Prev. 24 Hours: 0
User Count Overall: 137

People Online People Online:
Visitors Visitors: 11
Members Members: 0
Total Total: 11

NakedMCSE Computer Tech Support Forums

So you have passed all of the exams and you are now out in the real world of windows servers, linux servers and freebsd servers faced with a tech support problem you have never seen before...

Find free online tech support in the forums below, respecting that advice is free, but work beyond advice is not...

The General forum is provided for off topic discussion.

You need a user account to post - please Register or Login.

Online Tech Support Forums
  Forum  Discussions  General  Cleaning up MediaWiki after a spammer
Previous Previous
Next Next
New Post 2/18/2011 1:31 PM
119 posts
10th Level Poster

Cleaning up MediaWiki after a spammer 
Modified By Walker  on 2/18/2011 2:32:25 PM)

MediaWiki is an amazing open source project.  Its also by nature very open to spamming from link spammers if you put it up in the default configuration.

What it is not terribly good at is allowing you to clean up after a user has spammed the site from the interface.

The database that MediaWiki backends into is very interconnected, and the safest way to clean up is to restore a backup of the database.  However there are times when this would be undesirable (many more changes afterwards that would also be removed etc) or impossible (like you put it up and forgot about it)...

In that case, if you have access to the backend database directly, you may find the following useful.

The core of the database resides in four tables - user, revision, page and text.  Revision can be considered the core of the core, as the others link through it to relate to one another.

Users create revisions which have a page and text associated with them.

To all of the pages and revisions created by a user, you can use the following SQL commands:

select user_id from user where user_email='';

This will give you the internal user_id number referenced in the revision, page and text tables to allow you to remove what that user added.

First remove the text:

delete from text where old_id in (select rev_text_id from revision where rev_user=user_id);

Where user_id is the one you got from the select statement above.

Then remove the pages:

delete from page where page_id in (select rev_page from revision where rev_user=user_id);

Now remove the revisions:

delete from revision where rev_user=user_id;

And finally remove the user themselves:

delete from user where user_id=user_id;

Previous Previous
Next Next
  Forum  Discussions  General  Cleaning up MediaWiki after a spammer
Send me One Million FREE Guaranteed Visitors