Help:Installation/Upgrade from SMW 1.9+ for MW 1.22+

From semantic-mediawiki.org
Jump to: navigation, search
InstallationHelp:Installation/Upgrade from SMW 1.9+ for MW 1.22+
Installation
This page describes the upgrade procedure from SMW 1.9+ (MW 1.22+ / native Composer support).
Image / Video collection
Further Information
Installation type: upgrade
Installation method: Composer
mediawikiMinVersion: N/A
Table of Contents
  1. Backup your database and installation.
  2. Run the update script from the base directory[1] of your MediaWiki installation.[2] For example, to install SMW 1.9.*:
    php composer.phar require mediawiki/semantic-media-wiki:~1.9 --update-with-dependencies
    
  3. See the page "Special:Version" on your wiki to verify that the extension was successfully updated.
  4. Run the setup script from the base directory[1] of your MediaWiki installation:
    php maintenance/update.php
    
  5. Run the refresh database script from the base directory[1] of your MediaWiki installation:[3]
    php extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php -d 50 -v
    
  6. Done!

Switching to native Composer support

As documented in the requirements section the "Extension Installer" extension is only required for MediaWiki 1.19.x to MW 1.21.x since these versions of MediaWiki do not natively support Composer. Thus you will have to adapt the way to upgrade and update Semantic MediaWiki after upgrading to MediaWiki 1.22+:

  1. Backup your database and installation.
  2. Move the "composer.json" file from the …/extensions/ExtensionInstaller/ directory to the base directory[1] of your MediaWiki installation.
  3. Delete the directories SemanticMediaWiki/, Validator/ and vendor/ from within the …/extensions/ directory as well as the directories of the extensions which were also previously installed using the "Extension Installer" extension, e.g. Semantic Results Formats, etc. if applicable. See the "composer.json" file for the list of these extensions.
  4. Run the update script from the base directory[1] of your MediaWiki installation:[2]
    php composer.phar update
    
  5. See the page "Special:Version" on your wiki to verify that the extension(s) was/were successfully installed.
  6. Delete the directory ExtensionInstaller/ from within the …/extensions/ directory
  7. Remove the following line from the "LocalSettings.php" file:
    require_once "$IP/extensions/ExtensionInstaller/ExtensionInstaller.php";
    
  8. Done!

NoteNote:  These instructions deliberately do not involve an upgrade of Semantic MediaWiki. If a newer version is available than the one used prior to the switch described above when do the upgrading in a second step.

References

  1. 1.0 1.1 1.2 1.3 1.4 This is the directory which contains the "LocalSettings.php" file.
  2. 2.0 2.1 In case you installed Composer "globally" on your server, you will have to drop the php and .phar particles from the command.
  3. This is an optional step to take to assure that the semantic store is valid and up to date.