Manual:RefreshLinks.php

refreshLinks.php is a maintenance script used to [re]fill pagelinks, categorylinks, imagelinks tables. You should run it if you found that Categories are empty or doesn't show all pages, if "What links here?" doesn't work well or in some other link-related trouble.

Invocation
php maintenance/refreshLinks.php [starting_article]

Advanced Usage
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.

Example
vi-notebook:/var/lib/mediawiki1.7# php maintenance/refreshLinks.php Refreshing link table. Starting from page_id 1 of 1426. 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400

Troubleshooting
This script may run into memory issues in its current version. In case it runs out of memory simply rerun it with the last output page_id as the article to start at, e.g. php refreshLinks.php -- 1400