Help:Installation/Quick guide

From semantic-mediawiki.org
< Installation
Administrator manualInstallationHelp:Installation/Quick guide

Composer[edit]

Composer is installed and available (see Using Composer with MediaWiki and Installing Composer).

Compatibility[edit]

Please check the compatibility requirements.

Download[edit]

The following commands are run from the base directory of your MediaWiki installation:

You can either use:

php composer.phar require mediawiki/semantic-media-wiki "~3.0" --update-no-dev

or add the following lines to "composer.local.json" (it is a MediaWiki specific convention, composer require does not work on this file and instead has to be edited manually. See an example "composer.local.json" file for how to proceed.)

{
    "require": {
        "wikimedia/composer-merge-plugin": "~1.3",
        "mediawiki/semantic-media-wiki":"~3.0"
    }
}
composer update --update-no-dev
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.1" 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.

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 directory 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.