TEHCC Wiki:Maintenance: Difference between revisions
Jump to navigation
Jump to search
(→Site Maintenance: Update for php 5.6 on command line) |
(→System Maintenance: Added reinstall/upgrade section - crap formatting but good enough for now) |
||
Line 12: | Line 12: | ||
**# Delete patch files <code>rm ''mediawiki stable release number.patch''*</code> | **# Delete patch files <code>rm ''mediawiki stable release number.patch''*</code> | ||
* Upgrade - detailed later | * Upgrade/Reinstall - use to upgrade across major versions or to reinstall a borked install | ||
*# Download desired version [https://www.mediawiki.org/wiki/Download MediaWiki Site] using <kbd>wget</kbd> to the home directory | |||
*# Unpack using <kbd>tar -xvzf<kbd> (''e.g.'', <code>tar -xvzf ''mediawiki stable release number.tar.gz''</code>) | |||
*# Delete zipped tarball (''e.g.'', <code>rm ''mediawiki stable release number.tar.gz''</code>) | |||
*# Move the existing installation to a temporary backup folder <code>mv ~/public_html/clubwiki/ ~/public_html/OLD.yyyymmdd.clubwiki</code> | |||
*# Move the new installation to the public folder <code>mv ~/''mediawiki stable release number'' ~/public_html/clubwiki</code> | |||
*# Copy Localsettings.php (to be detailed later) | |||
*# Copy Images folder (to be detailed later) | |||
*# Install extensions/handlers (to be detailed later) | |||
**# Composer | |||
**# Semantic mediawiki | |||
**# NumberFormat | |||
**# Maps | |||
**# Page Forms | |||
**# Semantic result formats | |||
*# Run Mediawiki upgrade or command line update | |||
*# Done! | |||
* Update extensions | * Update extensions |
Revision as of 20:34, 23 November 2016
Maintenance notes:
System Maintenance
- Update MediaWiki
- Patch - Available for point releases. Details on the MediaWiki site
- Download patch from the dumps site
- cd to
cd ~/public_html/clubwiki/
directory (the one with LocalSettings.php). - Download (wget) the patch file from the dumps site and gunzip it
gunzip mediawiki stable release number.patch.gz
. - Use
patch -p1 --dry-run
to check what will be changed (e.g.,patch -p1 --dry-run -i mediawiki stable release number.patch
) - If all is well, run patch again without
--dry-run
. - Check Special:Version and you should see the new version number in place.
- Delete patch files
rm mediawiki stable release number.patch*
- Patch - Available for point releases. Details on the MediaWiki site
- Upgrade/Reinstall - use to upgrade across major versions or to reinstall a borked install
- Download desired version MediaWiki Site using wget to the home directory
- Unpack using tar -xvzf (e.g.,
tar -xvzf mediawiki stable release number.tar.gz
) - Delete zipped tarball (e.g.,
rm mediawiki stable release number.tar.gz
) - Move the existing installation to a temporary backup folder
mv ~/public_html/clubwiki/ ~/public_html/OLD.yyyymmdd.clubwiki
- Move the new installation to the public folder
mv ~/mediawiki stable release number ~/public_html/clubwiki
- Copy Localsettings.php (to be detailed later)
- Copy Images folder (to be detailed later)
- Install extensions/handlers (to be detailed later)
- Composer
- Semantic mediawiki
- NumberFormat
- Maps
- Page Forms
- Semantic result formats
- Run Mediawiki upgrade or command line update
- Done!
- Update extensions
- Composer based (Semantics, others?)
- cd to
cd ~/public_html/clubwiki/
directory (the one with LocalSettings.php). - Update composer
/usr/php/56/bin/php composer.phar self-update
- Update using composer
/usr/php/56/bin/php composer.phar update
- cd to
- Manual extensions - Go to Special:Version and compare what's shown on extension page
- NumberFormat - Download needed updates and extract into the extension directory
tar -xzf extension.tar.gz -C public_html/clubwiki/extensions/
- Note: Special:Version currently shows v0.8.0, but site shows v0.8.1, updating doesn't increment.
- NumberFormat - Download needed updates and extract into the extension directory
- Remaining extensions are part of MediaWiki and upgraded with it
- Composer based (Semantics, others?)
- Update completion - run maintenance routine from
cd ~/public_html/clubwiki/
directory:/usr/php/56/bin/php maintenance/update.php
Site Maintenance
- Cleanup after a spam/vandalism battle
- cd to
cd ~/public_html/clubwiki/
directory (the one with LocalSettings.php) - Delete archived revisions (deleted page revisions)
/usr/php/56/bin/php maintenance/deleteArchivedRevisions.php
for dry run, then execute/usr/php/56/bin/php maintenance/deleteArchivedRevisions.php --delete
- Delete users older than 7 days with no edits
/usr/php/56/bin/php maintenance/removeUnusedAccounts.php --ignore-touched 7
for dry run, then execute/usr/php/56/bin/php maintenance/removeUnusedAccounts.php --ignore-touched 7 --delete
- cd to