There is a maintenance script populateProjectsFromSiteMatrix.php to add projects to the reading_list_project table.
It would be helpful to have a --dry-run option to check what the script would be doing in any given run.
Once we are confident that the script works well, we should add it to steps for setting up a new Wikimedia project in production.
This script is needed to populate missing wikis, and help fix T428002.
Requirements
- Add a --dry-run option that outputs the list of projects that would be inserted
Technical notes
The script requires the SiteMatrix extension.
Locally, I have a wikifarm setup which works with SiteMatrix:
$wgLocalDatabases = [ 'enwiki', 'commonswiki', ... ]; $wgConf->wikis = $wgLocalDatabases; $wgConf->suffixes = [ 'wiki' ];