Maintenance scripts


Maintenance scripts are used to perform various administrative, import, maintenance and upgrade tasks. The scripts are deployed in the maintenance sub-directory of the Semantic MediaWiki software.

The following table lists the 13 maintenance scripts currently made available by Semantic MediaWiki:

NameDescriptionHelp PageAdded
dumpRDF.phpAllows to do an RDF export of existing triplesMaintenance script "dump­RDF.php"2.0.0
populateHashField.phpAllows to do mass populating of database field "smw_hash" when initially upgrading to Semantic MediaWiki 3.0.1 and laterMaintenance script "populate­Hash­Field.php"3.0.1
purgeEntityCache.phpAllows to purge all cache entries including associates of entities at once.Maintenance script "purgeEntityCache.php"3.1.0
rebuildConceptCache.phpAllows to rebuild (create, update, and delete) concept cachesMaintenance script "rebuild­Concept­Cache.php"1.9.2
rebuildData.phpAllows to rebuild all the semantic data for a selected data backend/storeMaintenance script "rebuild­Data.php"1.9.2
rebuildElasticIndex.phpAllows to ...Maintenance script "rebuild­Elastic­Index.php"3.0.0
rebuildElasticMissingDocuments.phpAllows to find missing entities (aka documents) from Elasticsearch and schedule "smw.update" jobs for those identified subjectsMaintenance script "rebuildElasticMissingDocuments.php"3.1.0
rebuildFulltextSearchTable.phpAllows to rebuild the full text search data tableMaintenance script "rebuild­Fulltext­Search­Table.php"2.5.0
rebuildPropertyStatistics.phpAllows to rebuild the property usage statisticsMaintenance script "rebuild­Property­Statistics.php"1.9.0
removeDuplicateEntities.phpAllows to remove all duplicate entities with no reference in any other table from the entity tableMaintenance script "remove­Duplicate­Entities.php"3.0.0
setupStore.phpAllows to set up the data backend/storeMaintenance script "setup­Store.php"2.0.0
updateEntityCollation.phpAllows to do mass updates of database field "smw_sort" on the occasion that setting for the entity collation was changedMaintenance script "update­Entity­Collation.php"3.0.0
updateQueryDependencies.phpAllows to update all entities that hold embedded queriesMaintenance script "updateQueryDependencies.php"3.1.0
Some scripts were renamed starting with Semantic MediaWiki 1.9.2Released on 18 April 2014 and compatible with MW 1.19.0 - 1.22.x. and now alias to the new names as shown in the table above. If you are still using the precursing names make sure that you migrate before the release of Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x. in early 2018.
If Semantic MediaWiki is not installed in its standard path then the "MW_INSTALL_PATH" environment variable must be set for the maintenance scripts to work. See the "README" file in the maintenance directory.

See also[edit]