Con­figu­ration para­meter "$smwgConfigFileDir"

From semantic-mediawiki.org
Configuration parameter details:
Name $smwgConfigFileDir
Description Sets the directory for storing the setup information file ensuring database consistency
Default setting
__DIR__
Software Semantic MediaWiki
Since version
Until version still available
Configuration Installation
Keyword installation · upgrade · database consistency


$smwgConfigFileDir is a configuration parameter that sets the directory for storing the setup information file ".smw.json" which is holding the upgrade key which verifies and ensures that the upgrade of the database was done correctly, i.e. by running maintenance script "setupStore.php"Allows to set up the data backend/store or maintenance script "update.php" (MediaWiki.org) respectively. It was introduced in Semantic MediaWiki 3.0.1Released on 25 January 2019 and compatible with MW 1.27.0 - 1.31.x.1.

The path for for storing the setup information file for verifying and ensuring database consistency must be writable, persistent and accessible for Semantic MediaWiki throughout its operation.

Default setting[edit]

$smwgConfigFileDir = __DIR__;

This means that by default the setup information file ".smw.json" will be stored in the root directory of the Semantic MediaWiki Software, i.e. /path/to/extensions/SemanticMediaWiki.

Changing the default setting[edit]

To modify the setting to this configuration parameter, add one of the following lines to your "LocalSettings.php" file after the enableSemantics() call:

Change the standard directory to store the file to the base directory of the wiki
$smwgConfigFileDir = $IP;

This means that the setup information file ".smw.json" will be stored in the base directory for the wiki2, e.g. /path/to/wiki.

Change the standard directory to store the file to a completely different directory
$smwgConfigFileDir = /usr/local/bin/smw;

This means that the setup information file ".smw.json" will be stored in /usr/local/bin/smw.

In a farmed multi wiki environment something like the following is possible, too to allow differentiating between individual wikis:
$smwgConfigFileDir = __DIR__ . "/../.config/{$wgDBname}";

See also[edit]

References

  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:3596
  2. ^  This is the directory which contains the "LocalSettings.php" file.