| Status: | effective |
| Progress: | 100% |
| Version: | 7.0.0+ |
Help:Setup information file
smw_meta database table. Semantic MediaWiki 6.x and earlier stored them in a ".smw.json" file, described under legacy setup information file below.1
Both the generated upgrade key2 as well as other status information34 as described on the help page on upgrades are recorded so that Semantic MediaWiki can verify the consistency of its database schema and the settings that influence it.
As of Semantic MediaWiki 7.0.0Released on 4 June 2026 and compatible with MW 1.43.x - 1.46.x., this information is held in the smw_meta database table.1 It records the upgrade key, the maintenance mode, incomplete-task flags, version tracking, database requirements, the last optimization run, and the entity collation. The information is generated or updated during the upgrade of the database by running maintenance script "setupStore.php"Allows to set up the data backend/store or maintenance script "update.php" (MediaWiki.org) respectively. Moreover some of the status information is also updated by maintenance script "populateHashField.php"Allows to do mass populating of database field "smw_hash" when initially upgrading to Semantic MediaWiki 3.0.1 and later.
If the upgrade key was not set or is incorrect the Update Error Screen is shown to the users, and if other status information indicates an incomplete state the upgrade information error message is shown to the users. In either case the information must be regenerated by running maintenance script "setupStore.php"Allows to set up the data backend/store or maintenance script "update.php" (MediaWiki.org).
Because this information is stored in the database, no shared filesystem is required for multi-server deployments.1
Legacy setup information file[edit]
smw_meta database table (see above). When upgrading from 6.x or earlier, the contents of an existing ".smw.json" file are merged into the table on the first run of maintenance script "update.php" (MediaWiki.org), after which the file is renamed to ".smw.json.migrated". Re-running the upgrade is safe. The configuration parameter $smwgConfigFileDirSets the directory for storing the setup information file ensuring database consistency setting is kept only so the upgrade can locate a ".smw.json" file at a non-default path.1
The file is stored at the location defined via configuration parameter $smwgConfigFileDirSets the directory for storing the setup information file ensuring database consistency5 which is by default the root directory of the Semantic MediaWiki Software, i.e. /path/to/extensions/SemanticMediaWiki. This path must be writable, persistent and accessible for Semantic MediaWiki throughout its operation. If this is not the case the Update Error Screen is shown informing about this problem. Note that the Update Error Screen is also shown if the file was manually manipulated.6
If the file cannot be written to the directory defined by configuration parameter $smwgConfigFileDirSets the directory for storing the setup information file ensuring database consistency an additional error message is shown to the system administrator apart from the the Update Error Screen which is shown to the users at the same time:
ERROR: /var/www/html/02100/w/.smw.json is not writable.
The "smwgConfigFileDir" setting should point to a
directory that is persistent and writable!
- Example content for the setup key file ".smw.json"
{
"0210020150926-02100_": {
"upgrade_key": "b1d9d6bec582041a8aca10a4d380cfc75aa86e7f",
"populate.smw_hash_field_complete": true
}
}
The wiki's upgrade key as well as other status information is referenced by the identifier holding the respective upgrade key. The identifier uses the wiki ID of the wiki, e.g. "0210020150926-02100_".
See also[edit]
- Help page on the setup check
- Help page on upgrading
- Help page on upgrade and setup consistency checking
- Help page on maintenance alerts
- Help page on configuration parameter
$smwgUpgradeKeySets the current database schema version - Help page on configuration parameter
$smwgConfigFileDirSets the directory for storing the setup information file ensuring database consistency
References
- a b c d | | Semantic MediaWiki: GitHub pull request gh:smw:6892
- ^ Semantic MediaWiki: GitHub pull request gh:smw:3095
- ^ Semantic MediaWiki: GitHub pull request gh:smw:3611
- ^ Semantic MediaWiki: GitHub pull request gh:smw:3715
- ^ Semantic MediaWiki: GitHub pull request gh:smw:3596
- ^ Semantic MediaWiki: GitHub issue comment gh:smw:3596:453788765
- ^ Semantic MediaWiki: GitHub issue comment gh:smw:3611:453855704
- ^ Semantic MediaWiki: GitHub issue comment gh:smw:3095:618347217