=====================
mediawiki-admin-guide
=====================


mediawiki-admin-guide
=====================

mediawiki admin guide ##########################

This post will document some common procedures that an admin will need
to maintain a media wiki installation.

.. contents::

What version of MediaWiki are we running?
=========================================

View the source of any wiki page. Locate the generator meta tag inside
the head tag.

Example:

.. code-block:: html

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>

.. raw:: html

   <html lang="en" dir="ltr">

.. raw:: html

   <head>

.. raw:: html

   <title>

Main Page - mywiki

.. raw:: html

   </title>

.. raw:: html

   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

.. raw:: html

   <meta name="generator" content="MediaWiki 1.16.2" />

In the example above our generator is *MediaWiki 1.16.2*.

Migrating and upgrading a MediaWiki install
===========================================

This documents the steps I took to migrate MediaWiki to a new server and
then upgrade to the latest version. RHEL4 to Ubuntu.

Install the webserver stack on new server:

.. code-block:: bash

sudo apt-get install apache2 php5 php5-mysql php5-cli php-apc graphviz
graphviz-dev

sudo cp -p /etc/apache2/sites-available/default
/etc/apache2/sites-available/001-wiki

sudo vim /etc/apache2/sites-available/001-wiki

Basic MediaWiki configuration:

.. code-block:: apache

<VirtualHost \*:80> ServerAdmin webmaster@localhost ServerName
wiki.foxhop.net

LogLevel warn ErrorLog /var/log/apache2/error-wiki.log CustomLog
/var/log/apache2/access-wiki.log combined

DocumentRoot /www/wiki/mediawiki Options FollowSymLinks MultiViews
AllowOverride None Order allow,deny allow from all

Create directories and download sourcecode:

.. code-block:: bash

sudo mkdir /www sudo mkdir /www/wiki cd /www/wiki # copy mediawiki
installation to new server and untar it sudo tar -zxvf
mediawiki-backup.tar.gz sudo chown -R root:www-data /www chmod 775
mediawiki/config/ -R

import MySQL dump into new server

.. code-block:: bash

mysql -u root -p wikidb < wikidb-dump-2012-11-26.sql

Enable Virtual Host and restart Apache

.. code-block:: bash

sudo a2ensite 001-wiki sudo a2dissite default sudo apache2 restart

Navigate to the new servers IP address or domain name and verify
migration.
