Upgrade from SMW 1.9.x or later to SMW 2.1.x (MW 1.19.0 to MW 1.21.x)

From semantic-mediawiki.org
< Help:Upgrade(Redirected from Upgrade from SMW 1.9.x or later to SMW 2.1.x (MW 1.19.0 to MW 1.21.x))
Administrator manualInstallationUpgradeUpgrade from SMW 1.9.x or later to SMW 2.1.x (MW 1.19.0 to MW 1.21.x)
Installation
This page describes the upgrade procedure from SMW 1.9.x or later to SMW 2.1.x (non-native Composer support).
Further Information
Installation type: upgrade
Installation method: Composer
MediaWiki version: 1.19.0 to 1.21.x
Table of Contents
  • Note that this help page assumes that you use MediaWiki 1.19.0 to 1.21.x. See also the help page on compatibility.
  • Once you have upgraded to Semantic MediaWiki 2.1.x you can continue to upgrade to newer versions of Semantic MediaWiki as explained in the relevant help pages.

Step 1 - Backup database and wiki[edit]

Backup your wiki database and wiki installation.

Step 2 - Install the utility extension[edit]

Install the utility extension called "Extension Installer" as described on it's homepage.

Step 3 - Update setup file[edit]

Change to the extension's directory at …/extensions/ExtensionInstaller/ in your server's shell and modify the "require" section of the "composer.json" file to look like this1:

{
	"require": {
                  "php": ">=5.3.2",
                  "mediawiki/semantic-media-wiki": "~2.1.0"
        }
}

Step 4 - Update software[edit]

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

php extensions/ExtensionInstaller/composer.phar update

Step 5 - Update database[edit]

Run maintenance script "update.php" (MediaWiki.org) from the base directory of your wiki4 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 -v

Step 6 - Rebuild data[edit]

Run maintenance script "rebuildData.php"Allows to rebuild all the semantic data for a selected data backend/store from the base directory of your wiki4 in your server's shell to rebuild the semantic data in wiki's database:

php extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php -v

Done![edit]

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

See also[edit]


References

  1. ^  | |  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.
  2. ^  | |  In case you installed Composer "globally" on your server, you will have to drop the php and .phar particles from the command.
  3. ^  | |  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.
  4. a b c  This is the directory which contains the "LocalSettings.php" file.