Skip to content

Latest commit

 

History

History
218 lines (168 loc) · 6.98 KB

INSTALL.md

File metadata and controls

218 lines (168 loc) · 6.98 KB

SMW installation

These are the installation and configuration instructions for Semantic MediaWiki.

This is a brief version of the installation instructions, containing only the core steps. More verbose installation instructions with additional explanation and upgrading instructions can be found on the SMW wiki.

Versions

Status Release date Git branch
SMW 1.9.3.x Development version - master
SMW 1.9.2 Stable release 2014-04-18 1.9.2
SMW 1.9.1 Legacy release 2014-02-09 1.9.1
SMW 1.9.0 Legacy release 2014-01-03 1.9
SMW 1.8.x Legacy release 2012-12-02 1.8.x
SMW 1.7.1 Legacy release 2012-03-05 1.7.1

Platform compatibility

PHP MediaWiki Composer Validator
SMW 1.9.x 5.3.2 - 5.6.x 1.19 - 1.23 Required 1.0.x (handled by Composer)
SMW 1.8.x 5.2.0 - 5.5.x 1.17 - 1.22 Not supported 0.5.1
SMW 1.7.1 5.2.0 - 5.4.x 1.16 - 1.19 Not supported 0.4.13 or 0.4.14

The PHP and MediaWiki version ranges listed are those in which SMW is known to work. It might also work with more recent versions of PHP and MediaWiki, though this is not guaranteed.

Database support

MySQL SQLite PostgreSQL
SMW 1.9.x Full support Full support Beta support
SMW 1.8.x Full support Full support Experimental
SMW 1.7.1 Full support Experimental None

Download and installation

Composer Installation

The recommended way to install Semantic MediaWiki is with Composer using MediaWiki 1.22 built-in support for Composer. MediaWiki versions prior to 1.22 can use Composer via the Extension Installer extension.

Step 1

If you have MediaWiki 1.22 or later, go to the root directory of your MediaWiki installation, and go to step 2. You do not need to install any extensions to support composer.

For MediaWiki 1.21.x and earlier you need to install the Extension Installer extension.

Once you are done installing the Extension Installer extension, go to its directory so composer.phar is installed in the right place.

cd extensions/ExtensionInstaller
Step 2

If you have previously installed Composer skip to step 3.

To install Composer:

wget http://getcomposer.org/composer.phar
Step 3

Now using Composer, install Semantic MediaWiki.

If you do not have a composer.json file yet, copy the composer-example.json file to composer.json. If you are using the Extension Installer extension, the file to copy will be named example.json, rather than composer-example.json. When this is done, run:

php composer.phar require mediawiki/semantic-media-wiki "~1.9.1"
Step 4

Run the MediaWiki update script. The location of this script is maintenance/update.php. It can be run as follows:

php maintenance/update.php
Step 5

Add the following line to the end of your LocalSettings.php file.

enableSemantics( 'example.org' );
Verify installation success

As final step, you can verify SMW got installed by looking at the "Special:Version" page on your wiki and verifying the Semantic MediaWiki section is listed.

Installation without shell access

As an alternative to installing via Composer, you can obtain the SMW code by getting one of the release tarballs. These tarballs include all dependencies of SMW.

This option exists mainly for those that have no command line access. A drawback of this approach is that it makes your setup incompatible with extensions that share dependencies with SMW. You are thus highly encouraged to use the Composer approach if you have command line access.

Step 1

Download an SMW tarball and extract it into your extensions directory.

Step 2

Add the following lines to the end of your LocalSettings.php file.

require_once "$IP/extensions/SemanticMediaWiki/SemanticMediaWiki.php";
enableSemantics( 'example.org' );
Step 3

Log in as a user with administrator permission to your wiki and go to the page "Special:SMWAdmin":

  • Click on the "Initialise or upgrade tables" button in the "Database installation and upgrade" section to setup the database.
  • Click on the "Start updating data" button in the "Data repair and upgrade" section to activate the automatic data update.
Verify installation success

As final step, you can verify SMW got installed by looking at the Special:Version page on your wiki and verifying the Semantic MediaWiki section is listed.

More instructions