My MediaWiki notes: Difference between revisions

From GotOpinion
Jump to navigation Jump to search
m update from 1.43.1 to 1.46.0
 
Line 44: Line 44:
|8.0.41-0ubuntu0.24.04.1
|8.0.41-0ubuntu0.24.04.1
|}
|}
<pre># Upgrading MediaWiki 1.43 to 1.46
# Follow steps at https://www.mediawiki.org/wiki/Manual:Upgrading
# with deviations and notes below
# Go to wiki root directory (example uses wiki.gotopinion.info)
cd /home/<myusername>/wiki.gotopinion.info
# MediaWiki uses:
mysqldump --opt --user=wikidb_user --password wikidb --no-tablespaces wikidb > file.sql
mysqldump --opt --user=wikidb_user --password=wikidb_userpassword wikidb --no-tablespaces --xml > file.xml
# Dreamhost requires some extra parameters, command format I used
mysqldump --opt --user=wikidb_user --password --host=wikidb_host wikidb --no-tablespaces wikidb > mediawiki-1.43.1.sql
mysqldump --opt --user=wikidb_user --password --host=wikidb_host wikidb --no-tablespaces --xml > mediawiki-1.43.1.xml
# copy LocalSettings.php
cp wiki/LocalSettings.php LocalSettings.php.20260719.bak
# copy .htaccess
cp .htaccess .htaccess.bak
# Make a complete copy of current wiki directory
tar -cvzf mediawiki-1.43.1.tar.gz wiki/
# Download MediaWiki 1.46.0
wget https://releases.wikimedia.org/mediawiki/1.46/mediawiki-1.46.0.tar.gz
# untar and decompress file
tar xvfz mediawiki-1.46.0.tar.gz
# remove the file
rm mediawiki-1.46.0.tar.gz
# move previous wiki to new directory
mv wiki wiki_v1.43.1_old
# move new wiki files to wiki
mv mediawiki-1.46.0 wiki
# move LocalSettings.php from old to new
cp wiki_v1.43.1_old/LocalSettings.php wiki/
# move images from old to new
cp -r wiki_v1.43.1_old/images/* wiki/images/
# execute run.php script
/usr/local/php84/bin/php maintenance/run.php update.php</pre>
<center>[[Main Page|To Main Page]]</center>
<center>[[Main Page|To Main Page]]</center>

Latest revision as of 13:36, 19 July 2026

Getting started

Resources

Preventing access in MediaWiki

WikiEditor extension

WikiEditor toolbar customization (plan to add code, pre, and a few more buttons)

HeadScript extension

Consult the User's Guide for information on using the wiki software.

My upgrade notes

Before starting upgrade (2026-07):

MediaWiki	1.43.1
PHP	8.4.20 (cgi-fcgi)
ICU	74.2
MySQL	8.0.41-0ubuntu0.24.04.1

After upgrade (2026-07):

MediaWiki 1.46.0
PHP 8.4.20 (cgi-fcgi)
ICU 74.2
MySQL 8.0.41-0ubuntu0.24.04.1
# Upgrading MediaWiki 1.43 to 1.46
# Follow steps at https://www.mediawiki.org/wiki/Manual:Upgrading
# 	with deviations and notes below

# Go to wiki root directory (example uses wiki.gotopinion.info)
cd /home/<myusername>/wiki.gotopinion.info

# MediaWiki uses:
mysqldump --opt --user=wikidb_user --password wikidb --no-tablespaces wikidb > file.sql
mysqldump --opt --user=wikidb_user --password=wikidb_userpassword wikidb --no-tablespaces --xml > file.xml

# Dreamhost requires some extra parameters, command format I used
mysqldump --opt --user=wikidb_user --password --host=wikidb_host wikidb --no-tablespaces wikidb > mediawiki-1.43.1.sql
mysqldump --opt --user=wikidb_user --password --host=wikidb_host wikidb --no-tablespaces --xml > mediawiki-1.43.1.xml

# copy LocalSettings.php

cp wiki/LocalSettings.php LocalSettings.php.20260719.bak

# copy .htaccess
cp .htaccess .htaccess.bak

# Make a complete copy of current wiki directory
tar -cvzf mediawiki-1.43.1.tar.gz wiki/

# Download MediaWiki 1.46.0
wget https://releases.wikimedia.org/mediawiki/1.46/mediawiki-1.46.0.tar.gz

# untar and decompress file
tar xvfz mediawiki-1.46.0.tar.gz

# remove the file
rm mediawiki-1.46.0.tar.gz

# move previous wiki to new directory
mv wiki wiki_v1.43.1_old

# move new wiki files to wiki
mv mediawiki-1.46.0 wiki

# move LocalSettings.php from old to new
cp wiki_v1.43.1_old/LocalSettings.php wiki/

# move images from old to new
cp -r wiki_v1.43.1_old/images/* wiki/images/

# execute run.php script
/usr/local/php84/bin/php maintenance/run.php update.php
To Main Page