0

I implemented a mediawiki site but unfortunately somebody created thousands of pages through thousand of users.

Which query could I run for deleting all pages created by these users except mine?

Mediawiki pages are in wiki_page and wiki_text in mediawiki databse but there is no field about who created those pages.

4
  • I think you'll have to look into the revision table. Or possibly recentchanges, if the pages were created recently. It's also possible there is some extension for this purpose.
    – svick
    Mar 29, 2013 at 21:48
  • 1
  • Oh my God, it'a very long procedure, but if there is no alternative, let's try! Thank you
    – Pitone
    Mar 30, 2013 at 15:27
  • How can i export all pages cerated by me? the question is always unsolved. there is no field about who create pages
    – Pitone
    Apr 3, 2013 at 11:46

2 Answers 2

0

I'd do it the silly way.

  1. List all page titles from Special:AllPages or using https://code.google.com/p/wikiteam/ dumpgenerator.py
  2. List all the titles created by you from Special:Contributions and some regex filtering or using the WebAPI
  3. Remove 2. from 1. using e.g. the comm command
  4. Use delete.py from PyWikipediaBot or deletebatch.php or the extension with the same name to delete all the titles in question.

1-3 can be replaced with any other way to make the list that you're more comfortable with, including database queries and WebAPI, or just recent changes depending on when/how the spam was created. If there's a title pattern you can just use the Nuke extension.

1
  • My problem is first point. Which query should i do? I check the database but i do not have an articles table where i could run: SELECT * FROM table WHERE user is not " me" because there is no field user. There isn't in wiki_text table and there isn't in wiki_pages table.
    – Pitone
    Jun 8, 2013 at 1:57
0

I'm dealing with this problem too. I've found some code to block user creation and editing so it shouldn't happen again, but I'm not looking forward to deleting all the junk one by one...

Copy the following to your LocalSettings.php:

# Prevent new user registrations by anyone
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['sysop']['createaccount'] = false;

# Disable anonymous editing
$wgGroupPermissions['*']['edit'] = false;

# Prevent new user registrations except by sysops
$wgGroupPermissions['*']['createaccount'] = false;

$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['user']['edit'] = false;
$wgGroupPermissions['sysop']['edit'] = true;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.