Help:Maintenance script "setupStore.php"

Jump to: navigation, search
Allows to set up the data backend/store
Further Information
Provided by: Semantic MediaWiki
Added: 2.0
Removed: still in use
Location (path): ./extensions/SemanticMediaWiki/maintenance/
Class docu: SetupStore
Table of Contents

The "setupStore.php" is a maintenance script sets up the storage backend currently selected in the "LocalSettings.php" file or the default SQLstore if no other store was selected.

Important Notes

  • This maintenance script deprecated the former "SMW_setup.php" script starting with Semantic MediaWiki 2.0 while options and usage at that time remain the same.
NoteNote:  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 in late 2017.
  • If SMW is not installed in its standard path then the "MW_INSTALL_PATH" environment variable must be set. See README in the maintenance directory.


php setupStore.php [--password|--delete|--backend|--nochecks] [backend]
NoteNote: This only shows the script specific parameters.


Generic parameters

--help (-h)
Display this help message
--quiet (-q)
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. 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
NoteNote: 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 "rebuildData.php" (rebuild) but this may take some time.
The backend to use. For instance "SMWSQLStore3" or "SMWSQLStore2".
When specified, no prompts are provided. Deletion will thus happen without the need to provide any confirmation.


Execute the operation for the storage backend of the given name.


The following command verbosely creates the tables to be used by the default backend.
php setupStore.php
The following command verbosely deletes existing tables used by the "SMWSQLStore2" backend after prompting for confirmation.
php setupStore.php --delete --backend SMWSQLStore2

This documentation page applies to all SMW versions from 2.0 to the most current version.

Help:setupStore.php en 2.0