User:WikiMaster/Wiki - Installation & Upgrading

From PortlandWiki
Jump to navigation Jump to search

MediaWiki: Upgrading

BACKUP FIRST! Manual:Backing up a wiki
You can easily create a dump file(export/backup) of a database using the phpMyAdmin tool.
  • Consider making the Wiki read-only before creating the backup - see Manual:$wgReadOnly. This makes sure all parts of your backup are consistent (some of your installed extensions may write data nonetheless).
Developer hub
Sysadmin hub
From the command line, or an SSH shell or similar, change to the maintenance directory and execute the update script: $ php update.php Use this command instead: /usr/local/php53/bin/php update.php
Full report here: User:WikiMaster/The_Dingo_Ate_My_Wiki

Read-Only Mode

The following two examples show the $wgReadOnly setting to add to your LocalSettings.php file to lock the database while you upgrade.

$wgReadOnly = 'This wiki is currently being upgraded to a newer software version.';
$wgReadOnly = "We are upgrading MediaWiki, please be patient. This wiki will be back in a few hours.";

Logo & Favicon Settings

Using Git

Git downloads

You can download code directly via Git from the MediaWiki source code repository (browse code) or download a snapshot. To get the latest version of an extension, for instance, just clone the git master.

For example, if you have shell access to your server, you may do this to download the Validator extension:

cd extensions
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Validator.git
Wikimedia Projects on Git
  • Projects - Big list of MediaWiki extensions and other Wikimedia project available for download from Git repository.
Help Resources
An example of downloading Validator using Git.
Using Git to download MediaWiki
Git Check DreamHost VPS
Instructions here: Pre-installed git
Last login: Sat Jun 16 07:47:42 2012 from 97.115.118.134
[ps11244]$ which git
/usr/bin/git
[ps11244]$ git --version
git version 1.7.1.1
[ps11244]$

How to Patch MediaWiki to latest version

Example -- Patch update MediaWiki 1.22.0 to MediaWiki 1.22.3:
  1. Download Patch Into Main Directory: wget http://releases.wikimedia.org/mediawiki/1.22/mediawiki-1.22.3.patch.gz
  2. Uncompress File: gunzip mediawiki-1.22.3.patch.gz
  3. Move Patch To Wiki Directory: mv mediawiki-1.22.3.patch /path/to/your/wiki
  4. Do a Dry Run First: patch -p1 --dry-run < mediawiki-1.22.3.patch
  5. Apply Patch: patch -i mediawiki-1.22.3.patch -p 1
  6. Remove Patch File: rm -rf mediawiki-1.22.3.patch
Source: Manual:Upgrading#Using_patch
Unix / Linux / Bash

Performance Tuning

Long-winded tutorial showing how to set up memcached on DH VPS and use it for domains hosted on DH shared servers.

References