Manual:RefreshLinks.php/zh

详情
refreshLinks.php文件是用于[Re]填充、和表的维护脚本. 如果您发现类别为空或没有显示所有相关页面，如果“What Links Here”，您应该运行它. 不能很好地工作，或者其他与链接相关的问题. 此外，此脚本还从下表中清除指向不存在的页面的链接： pagelinks, categorylinks, imagelinks,, , , , ,

基本
 php maintenance/refreshLinks.php [starting_article]

例如，如果希望脚本以id为8000的页面开始：

 php maintenance/refreshLinks.php 8000

高级
 php refreshLinks.php [--conf|--dbpass|--dbuser|--dfn-only|--e|--globals|--help|--m|--new-only|--old-redirects-only|--quiet|--redirects-only|--wiki]

参数
This also supports the common options as well.

Avoiding memory issues
This script may run into memory issues. To avoid this you may like to set a last page_id to refresh.

 php refreshLinks.php --e 1500

To do the next set of page_ids you enter

 php refreshLinks.php --e 3000 -- 1500

Just continue until all page ids in your wiki were refreshed.

If you forgot to set a last  to refresh and the script runs out of memory simply rerun it with the last output   as the article to start at, e.g.

 php refreshLinks.php -- 1600

Chunking refreshLinks.php to refresh all links without memory leak
Below is an example script to run refreshLinks.php against all pages but without having memory issues.