Upgrade from Mediawiki v1.21 to Mediawiki v1.23.0 on Debian Wheezy

Mediawiki 1.23.0 is the first stable release of the new MediaWiki 1.23 release series. This is a Long Term Support release (LTS) and will be supported until May 2017.


You may need these:

# apt-get install apache2 mysql-server php5 php5-common libapache2-mod-php5 php5-cli php5-mysql php5-curl php5-gd php-apc php5-intl

If using SSL on Apache:

# a2enmod rewrite ssl

These are needed for email messages (password reset etc):

# apt-get install php-pear
# pear install mail  
# pear install net_smtp


Download the Mediawiki 1.23.0 package and extract it:

# wget http://download.wikimedia.org/mediawiki/1.23/mediawiki-1.23.0.tar.gz
# tar xvfz ./mediawiki-1.23.0.tar.gz

Change the name as you need:

# mv ./mediawiki-1.23.0 ./wiki

Stop the webserver (Apache2 in our case):

# service apache2 stop

Backup the database (!):

# mysqldump -uroot -p wiki_db >/root/wiki_backup.sql


Rename the current Mediawiki folder to wiki-1.21.10:

# mv /var/www/wiki /var/www/wiki-1.21.10

Move the new Mediawiki v1.23 folder to the webserver’s root /var/www/:

# mv ./wiki/ /var/www/

Change to webserver’s root directory:

# cd /var/www/

Copy files:

# cp ./wiki-1.21.10/LocalSettings.php ./wiki/
# cp ./wiki-1.21.10/logo.png ./wiki/
# cp ./wiki-1.21.10/favicon.ico ./wiki/

Copy extensions and images (assuming you have checked the compatibility of any installed extensions):

# cp -R ./wiki-1.21.10/extensions/ ./wiki/
# cp -R ./wiki-1.21.10/images/ ./wiki/

Make the LocalSettings.php configuration file readable by the webserver:

# chown -R root:root ./wiki/
# chown root:www-data ./wiki/LocalSettings.php

Make the cache directory writeable by the webserver group:

# chown root:www-data ./wiki/cache
# chmod 0775 ./wiki/cache

Perform the database upgrade. This will insert missing tables, update existing tables, and move data around as needed:

# php5 ./wiki/maintenance/update.php --quick

Start the webserver:

# service apache2 start

Related Posts

Tune Up Mediawiki v1.21 Installation for a Personal Usage