MediawikiTips

From Linusphere
Jump to: navigation, search

Delete all spams

  1. DELETE FROM user WHERE user_id != YOUR_USER_ID; or DELETE FROM user WHERE user_id > LAST_VALID_USER_ID;
  2. DELETE FROM user_groups WHERE ug_user NOT IN (SELECT user_id FROM user);
  3. DELETE FROM user_properties WHERE up_user NOT IN (SELECT user_id FROM user);
  4. DELETE FROM user_newtalk WHERE user_id NOT IN (SELECT user_id FROM user);
  5. DELETE FROM revision WHERE rev_user > 0 AND rev_user NOT IN (SELECT user_id FROM user);
  6. DELETE FROM revision WHERE rev_user = 0
  7. UPDATE page SET page_latest = 0;
  8. UPDATE page SET page_latest = (SELECT MAX(rev_id) FROM revision WHERE rev_page = page_id);
  9. DELETE FROM page WHERE page_latest = 0;

OR

  1. Export articles created by you (presumably logged in as the WikiSysop user or similar)
  2. Drop the MW database
  3. Create an empty MW database
  4. Copy your LocalSettings.php file to a safe location
  5. Re-upload the /config/ directory
  6. Run the installation process on the new MW database (note that you will want to re-create your old admin user)
  7. Delete the /config/ directory and move your old LocalSettings.php file back to the MW root
  8. Import the file created at Step #1

Syntax Highlight

https://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi

Before version 1.24, add the following line in LocaSettings.pho

require_once "$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php";