|Found errors or typos? Just edit the page or leave a message on the talk page.|
The English language documentation is canonical and most up to date.
Maintenance script "setupStore.php"
|Allows to set up the data backend/store|
|Provided by:||Semantic MediaWiki|
|Removed:||still in use|
|Table of Contents|
This maintenance script deprecated the former "SMW_setup.php" script starting with Semantic MediaWiki 2.0.0Released on 4 August 2014 and compatible with MW 1.19.0 - 1.24.x. while options and usage at that time remain the same. It is strongly encouraged to make the transition to this new script to take advantage of the new features added since and because the old one will will be removed with the release of Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x. in fall 2018.
php setupStore.php [--password|--delete|--backend|--nochecks|--skip-optimize|--skip-import] [backend]
This only shows the script specific parameters.
||Display this help message|
||Whether to supress non-error output|
||Location of "LocalSettings.php", if not default|
||For specifying the wiki ID|
||Output globals at the end of processing for debugging|
||Set a specific memory limit for the script, "max" for no limit or "default" to avoid changing it|
||The protocol and server name to use in URLs, e.g. https://www.semantic-mediawiki.org. This is sometimes necessary because server name detection may fail in command line scripts.|
Script dependant parameters
||The DB user to use for this script|
||The password to use for this script|
Script specific parameters
||The password for the user account
Note: Specifying user credentials in a command line call will usually store them within the shell history file.
||Delete all semantic data, uninstall the selected storage backend. This is useful when moving to a new storage engine, and in the rare case of unsinstalling Semantic MediaWiki. Deleted data can be recreated using this script (setup) followed by maintenance script "rebuildData.php"Allows to rebuild all the semantic data for a selected data backend/store (rebuild) but this may take some time.|
||Execute the operation for the storage backend of the given name. For instance "SMWSQLStore3" or "SMWSQLStore2".|
||When specified, no prompts are provided. Deletion will thus happen without the need to provide any confirmation.|
||When specified the key distribution is not being analyzed, optimized and stored. Thus the internal query planner cannot determine the most efficient execution for queries.|
||When specified, the import process of default or custom vocabularies is not being done.|
If Semantic MediaWiki is not installed in its standard path then the "MW_INSTALL_PATH" environment variable must be set. See README in the maintenance directory.
- The following command verbosely creates the tables to be used by the default backend.
- The following command verbosely deletes existing tables used by the "SMWSQLStore2" backend after prompting for confirmation.
php setupStore.php --delete --backend SMWSQLStore2
- The following command skips the database optimization process.
php setupStore.php --skip-optimize
- The following command skips the import of vocabularies while still doing the database optimization process.
php setupStore.php --skip-import
This is best used on a regular basis to assure optimal wiki health.
- Semantic MediaWiki: GitHub pull request gh:smw:2801