MediaWiki: Unterschied zwischen den Versionen

Aus wiki.frank-wulf.de
Zur Navigation springen Zur Suche springen
Keine Bearbeitungszusammenfassung
 
Zeile 16: Zeile 16:
rsync -axHAWXS --numeric-ids --info=progress2 ./mediawiki/images/ ./mediawiki-"${VERSION_LONG}"/images</syntaxhighlight>
rsync -axHAWXS --numeric-ids --info=progress2 ./mediawiki/images/ ./mediawiki-"${VERSION_LONG}"/images</syntaxhighlight>


3. Copy some extensions and skins to new directory
3. Rename the old installation directory and then rename the new one to match the old name
<syntaxhighlight lang="bash">rsync -axHAWXS --numeric-ids --info=progress2 ./mediawiki/extensions/VisualEditor/ ./mediawiki-"${VERSION_LONG}"/extensions/VisualEditor
rsync -axHAWXS --numeric-ids --info=progress2 ./mediawiki/skins/CologneBlue/ ./mediawiki-"${VERSION_LONG}"/skins/CologneBlue
rsync -axHAWXS --numeric-ids --info=progress2 ./mediawiki/skins/Modern/ ./mediawiki-"${VERSION_LONG}"/skins/Modern</syntaxhighlight>
 
4. Rename the old installation directory and then rename the new one to match the old name
<syntaxhighlight lang="bash">mv mediawiki mediawiki-"${VERSION_OLD}"
<syntaxhighlight lang="bash">mv mediawiki mediawiki-"${VERSION_OLD}"
mv mediawiki-"${VERSION_LONG}" mediawiki</syntaxhighlight>
mv mediawiki-"${VERSION_LONG}" mediawiki</syntaxhighlight>


5. Run update script for database scheme
4. Run update script for database scheme
<syntaxhighlight lang="bash">cd mediawiki/maintenance
<syntaxhighlight lang="bash">cd mediawiki/maintenance
php update.php</syntaxhighlight>
php update.php</syntaxhighlight>


6. Restart Apache Webserver
5. Restart Apache Webserver
<syntaxhighlight lang="bash">systemctl restart apache2
<syntaxhighlight lang="bash">systemctl restart apache2
</syntaxhighlight>
</syntaxhighlight>

Aktuelle Version vom 29. Juli 2023, 18:16 Uhr

Upgrading MediaWiki

1. Download and install new version in new directory

export VERSION_SHORT=1.32
export VERSION_LONG=1.32.0
export VERSION_OLD=1.31.0
cd /var/lib
wget https://releases.wikimedia.org/mediawiki/"${VERSION_SHORT}"/mediawiki-"${VERSION_LONG}".tar.gz
tar -xvzf mediawiki-"${VERSION_LONG}".tar.gz
rm mediawiki-"${VERSION_LONG}".tar.gz

2. Copy configuration file and images to new directory

cp -r --preserve=all ./mediawiki/LocalSettings.php ./mediawiki-"${VERSION_LONG}"
rsync -axHAWXS --numeric-ids --info=progress2 ./mediawiki/images/ ./mediawiki-"${VERSION_LONG}"/images

3. Rename the old installation directory and then rename the new one to match the old name

mv mediawiki mediawiki-"${VERSION_OLD}"
mv mediawiki-"${VERSION_LONG}" mediawiki

4. Run update script for database scheme

cd mediawiki/maintenance
php update.php

5. Restart Apache Webserver

systemctl restart apache2