Difference between revisions of "Upgrade a wiki"

From Organic Design wiki
m
(Change source-code blocks to standard format)
 
(7 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
}}
 
}}
  
First, update the ''/var/www/wikis/SHORTNAME/wiki'' symlink to point to the new code-base.
+
Shell in and change to the wiki's directory in ''/var/www/wikis''.
 +
 
 +
Put the site down for maintenance by adding '''$wgSiteDown = true;''' to it's ''LocalSettings.php'' file.
 +
 
 +
Update ''wiki'' symlink to point to the new code-base.
  
 
Upgrading a wiki to a more recent version involves running the [[MW:Manual:Update.php|''update.php'']] [[MW:Manual:Maintenance scripts|maintenance]] script. Make sure that you have [[Creating an AdminSettings.php|created an AdminSettings.php]] first.
 
Upgrading a wiki to a more recent version involves running the [[MW:Manual:Update.php|''update.php'']] [[MW:Manual:Maintenance scripts|maintenance]] script. Make sure that you have [[Creating an AdminSettings.php|created an AdminSettings.php]] first.
  
 +
For information on how to do this, see [[Run a wiki maintenance script]]
 +
 +
== Using XML dumps instead of SQL ==
 +
For upgrades that involve major unfixable problems it may be necessary to use XML exports instead...
  
For information on how to do this, see [[Run a wiki maintenance script]]
+
See [http://www.sit.auckland.ac.nz/Wiki_migration Robs notes]
 +
 
 +
== Illegal mix of collations error ==
 +
If the wiki has [[MW:DPL|DPL]] running on it you may have an error similar such as:
 +
:'''Illegal mix of collations (utf8_general_ci,COERCIBLE) and (latin1_bin,IMPLICIT) for operation 'concat' '''
 +
 
 +
This problem can be solved by looping through all the tables and setting their character set to ''utf8'' using the [[change the character-set of a wiki database]] procedure. but first you're best to get rid of the database view that DPL uses with '''drop prefix_dpl_clview''', then change the character sets as shown in the procedure, and then put the DPL view back as shown below (from the [[DPL:DPL:Manual - Source and Installation|DPL manual]]):
 +
<source lang="mysql">
 +
CREATE VIEW prefix_dpl_clview AS
 +
SELECT IFNULL(cl_from, page_id) AS cl_from, IFNULL(cl_to, '') AS cl_to, cl_sortkey
 +
  FROM `prefix_page` LEFT OUTER JOIN `prefix_categorylinks` ON page_id=cl_from;
 +
</source>
  
 
== See also ==
 
== See also ==
 +
*[http://www.sit.auckland.ac.nz/Upgrading_a_MediaWiki Upgrading a MediaWiki]
 
*[[MW:Category:Upgrading]]
 
*[[MW:Category:Upgrading]]
 
*[[MW:Manual:Upgrading to 1.12]]
 
*[[MW:Manual:Upgrading to 1.12]]

Latest revision as of 18:11, 22 May 2015

Procedure.svg Upgrade a wiki
Organic Design procedure

Shell in and change to the wiki's directory in /var/www/wikis.

Put the site down for maintenance by adding $wgSiteDown = true; to it's LocalSettings.php file.

Update wiki symlink to point to the new code-base.

Upgrading a wiki to a more recent version involves running the update.php maintenance script. Make sure that you have created an AdminSettings.php first.

For information on how to do this, see Run a wiki maintenance script

Using XML dumps instead of SQL

For upgrades that involve major unfixable problems it may be necessary to use XML exports instead...

See Robs notes

Illegal mix of collations error

If the wiki has DPL running on it you may have an error similar such as:

Illegal mix of collations (utf8_general_ci,COERCIBLE) and (latin1_bin,IMPLICIT) for operation 'concat'

This problem can be solved by looping through all the tables and setting their character set to utf8 using the change the character-set of a wiki database procedure. but first you're best to get rid of the database view that DPL uses with drop prefix_dpl_clview, then change the character sets as shown in the procedure, and then put the DPL view back as shown below (from the DPL manual):

CREATE VIEW prefix_dpl_clview AS 
 SELECT IFNULL(cl_from, page_id) AS cl_from, IFNULL(cl_to, '') AS cl_to, cl_sortkey 
  FROM `prefix_page` LEFT OUTER JOIN `prefix_categorylinks` ON page_id=cl_from;

See also