Upgrade from SMW 4.1.x to SMW 4.2.x (MW 1.35.0 to MW 1.41.x)

From semantic-mediawiki.org
Installation
This page describes the upgrade procedure from SMW 4.1.x to SMW 4.2.x
Further Information
Installation type: upgrade
Installation method: Composer
MediaWiki version: 1.35.0 to 1.41.x
Table of Contents

This help page describes the upgrade procedure from Semantic MediaWiki 4.1.x to Semantic MediaWiki 4.2.x with native Composer support.

Step 1 - Check compatibility

Check the compatibility of your environment with Semantic MediaWiki, most notably the compatibility with MediaWiki and PHP. For detailed information, see the help page on compatibility.

Step 2 - Backup database and wiki

Backup your wiki database and wiki installation.

Step 3 - Update setup file

Change to the base directory of your wiki1 in your server's shell and modify the "composer.local.json" file to look like this2 or contains "mediawiki/semantic-media-wiki": "~4.2.0":

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

Step 4 - Update Semantic MediaWiki

Run the composer command34 from the base directory of your wiki1 in your server's shell to upgrade the source code of Semantic MediaWiki and dependencies:

php composer.phar update --no-dev

Step 5 - Invoke Semantic MediaWiki

Make sure that you have the following lines in your "LocalSettings.php" file:

wfLoadExtension( 'SemanticMediaWiki' );
enableSemantics( 'example.org' );

Note that "example.org" should be replaced by your wiki's domain.

Step 6 - Update database

Run maintenance script "update.php" (MediaWiki.org) from the base directory of your wiki1 in your server's shell to apply the schema changes to your wiki's database:

php maintenance/update.php

Or alternatively use maintenance script "setupStore.php"Allows to set up the data backend/store:

php extensions/SemanticMediaWiki/maintenance/setupStore.php

Done!

Semantic MediaWiki and the database use should now be appropriately upgraded. The wiki may now be used again.

See also


References

  1. a b c  This is the directory which contains the "LocalSettings.php" file.
  2. ^  | |  This help page assumes that your are only upgrading Semantic MediaWiki. In case you installed further extensions to Semantic MediaWiki the "composer.local.json" needs to be adapted accordingly. See an example.
  3. ^  | |  In case you installed Composer "globally" on your server, you will have to drop the php and .phar particles from the command.
  4. ^  | |  This help page assumes that the "composer.phar" file is located in the base directory of your wiki. If not the path to the "composer.phar" file needs to be adapted to the server's situation.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.