Use SQL to delete old MediaWiki revisions without shell access?

点点圈 提交于 2019-12-07 16:54:12

问题


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


回答1:


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

  1. Backup your database
  2. Backup your MediaWiki folder
  3. Setup Apache (the web server) on your computer
  4. Setup MySQL on your computer
  5. Restore your MediaWiki database on your computer
  6. Put your MediWiki folder on the Apache root folder
  7. Finally run the maintenance task you want using shell. I suggest you the deleteOldRevisions script
  8. After that, rebackup the folder and the database and restore them on the remote host



回答2:


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!