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

.. raw:: html

   <table class="provenance-header" style="border: 0; border-collapse: collapse; margin: 0 0 16px 0; width: 100%;">

.. raw:: html

   <tr style="border: 0;">

.. raw:: html

   <td style="border: 0; vertical-align: top; padding: 0 24px 0 0;">

..

   | **Source:**
     https://foxhop.net/f3c4d71b-2f95-11f1-83d8-e86a64d24d78/mediawiki-admin-guide
   | **Snapshot:** 2026-10-16T04:57:49Z
   | **Generator:** Remarkbox ``d747782``

   *This is a thread snapshot. The living document lives at the source
   URI above — it may have been edited, extended, or replied-to since.*

.. raw:: html

   </td>

.. raw:: html

   <td style="border: 0; vertical-align: top; width: 200px; text-align: right;">

.. figure:: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAACkAQAAAAAxzrjsAAABcElEQVR42tWXO27EMBBDB7nA3P+WvIHCR6lIsU0AFomAtSUXXJrD+XjOh6X5w09nZs/6NyN546O+5tP6zdM5e87qjCF9n82xgmuslYznjZZjD9dXQyJLFxdoCaF7uBY0uOjw5G7gYoAfq+YH1uPLLu7r6GuChG2ei7eEaz0JGnkBZ3uigiteXgfnHtiaeUffCbDhTRsRWvmGv3AFStyE6/jMDEkINooiHX1fAutmsHiDlg5mqAhgzkjRiRuCxr1Y2TWipK/pKeXMoMjc0vfEtZYWTP6nVh8m3r3FjH0rbssV55LM26oPZJuhFlfExKflX8wwdGb687Tqg5RYYVvCV/Ov4RD1lQYaXKn+6vr3JD2klr4ZduCcG12oVx9gfaJHwtjBRVOlK1McpqVvEjk5jHk3bmvNDw8aS7B6806MTIWHb3PuSyeCO82uh4scSt8gjDVc2kS6/Wyt/maAzAxxe/4U50kidktb2nLNv//nO+sbjYzCooHhkcEAAAAASUVORK5CYII=
   :alt: Scan for living source

   Scan for living source

.. raw:: html

   </td>

.. raw:: html

   </tr>

.. raw:: html

   </table>

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

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

.. container::

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

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

Example:

.. container::
   :name: cb1

   ::

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      <html lang="en" dir="ltr">
      <head>
      <title>Main Page - mywiki</title>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <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:

.. container::
   :name: cb2

   ::

      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:

.. container::
   :name: cb3

   ::

      <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
       <Directory /www/wiki/mediawiki/>
         Options FollowSymLinks MultiViews
         AllowOverride None
         Order allow,deny
         allow from all
       </Directory>

      </VirtualHost>

Create directories and download sourcecode:

.. container::
   :name: cb4

   ::

      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

.. container::
   :name: cb5

   ::

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

Enable Virtual Host and restart Apache

.. container::
   :name: cb6

   ::

      sudo a2ensite 001-wiki
      sudo a2dissite default
      sudo apache2 restart

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

--------------

| **Source:**
  https://foxhop.net/f3c4d71b-2f95-11f1-83d8-e86a64d24d78/mediawiki-admin-guide
| **Snapshot:** 2026-10-16T04:57:49Z
| **Generator:** Remarkbox ``d747782``
