Does anyone know a SQL query that will purge a MediaWiki database of old revisions? My database has grown out of control, and I need to prune it to make it possible to download and manage.
I don't have shell access so, I need to do this with a SQL query.
I have tried the solution suggested here, but it doesn't work http://www.mediawiki.org/wiki/Extension_talk:SpecialDeleteOldRevisions2#Deleting_only_archived_revisions
Thanks for reading :)
Nicholas
As you, I don't have shell access to my MediaWiki. So I can't do a lot of things like maintenance.
Here is my solution : host your MediaWiki web site on your computer just to do your maintenance tasks
- Backup your database
- Backup your MediaWiki folder
- Setup Apache (the web server) on your computer
- Setup MySQL on your computer
- Restore your MediaWiki database on your computer
- Put your MediWiki folder on the Apache root folder
- Finally run the maintenance task you want using shell. I suggest you the deleteOldRevisions script
- After that, rebackup the folder and the database and restore them on the remote host
Use the Maintenance extension and run the relevant maintenance scripts with it. Direct database manipulation is pure madness, and using a local LAMP install as suggested by the other answer quite cumbersome. Shell access is really required to properly run a MediaWiki but this is a common problem, please report your experience with the extension on the talk page or file a bug if you find any.
来源:https://stackoverflow.com/questions/12870048/use-sql-to-delete-old-mediawiki-revisions-without-shell-access