帮助:维护脚本
来自陋室
更多操作
常用维护脚本
这些脚本涉及到数据库优化、文件清理、索引重建、权限更新等操作,通常是为了确保 MediaWiki 实例能够稳定运行,并且提升性能和响应速度。
数据库优化与更新
# 更新数据库架构(快速模式,不做过多检查)
php maintenance/run.php update.php --quick
# 重建数据库中的“最近更改”记录
php maintenance/run.php rebuildrecentchanges.php
# 重建所有内容(页面、修订、文件等)
php maintenance/run.php rebuildall.php
# 重建文本索引(用于全文搜索)
php maintenance/run.php rebuildtextindex.php
# 刷新页面中的链接数据
php maintenance/run.php refreshLinks.php
# 清理无效的页面标题(干运行模式,仅模拟,不做实际修改)
php maintenance/run.php cleanupTitles.php --dry-run
分类和页面维护
# 删除过期的修订记录,减少数据库体积(干运行模式,仅模拟,不做实际删除)
php maintenance/run.php deleteOldRevisions.php --dry-run
作业与后台处理
# 手动执行所有后台作业,确保没有待处理的作业(如图片处理、邮件发送等)
php maintenance/run.php runJobs.php