Installation – Quick Guide

From semantic-mediawiki.org
< Installation
Administrator manualInstallationInstallation – Quick Guide

Composer[edit]

Composer needs to be installed and available first. See Using Composer with MediaWiki and Installing Composer if unsure.

Compatibility[edit]

Please check the compatibility requirements.

Prepare and obtain[edit]

If you do not have a "composer.local.json" file yet, create one in the base directory1 of your MediaWiki installation and add the following content to it:

{
	"require": {
                  "mediawiki/semantic-media-wiki": "~3.0"
        }
}

See also an example "composer.local.json" file if unsure how to proceed.

The version stated in the line above is provided as an example. See the Releases page on GitHub for newer releases. If there is e.g. a release called "SMW 3.0.2" you will have to replace "~2.5" with "~3.0" to get the latest stable release. Please always omit the bugfix release number, i.e. the third number with additional information about the ~ usage can be found here.

Now run the following command from the base directory1 of your MediaWiki installation:

composer update --no-dev

Enable[edit]

Add a call to enableSemantics() to the end of the "LocalSettings.php" file. enableSemantics() takes in the domain name of the wiki; a wiki located at "example.org", for instance, should have the following call:

enableSemantics( 'example.org' );
The calls require_once ( … );, wfLoadExtension( … ); or wfLoadExtensions( … ); must not be added to invoke Semantic MediaWiki.

Setup and update[edit]

Run the update.php script from the base directory1 of your MediaWiki installation:

php maintenance/update.php
Add --skip-external-dependencies to the call of the setup script if you get an error message similar to the following one:
mediawiki/semantic-media-wiki: 2.5.0 installed, ~2.5 required.

Verify[edit]

Check the "Special:Version" page on your wiki and verify that the extension has been successfully installed and enabled.

Test your installation as described on the help page about testing Semantic MediaWiki.


References

  1. a b c  This is the directory which contains the "LocalSettings.php" file.