Editing TEHCC Wiki:Maintenance
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
'''Note!''' Any site specified use of php on the command line should replace <kbd>php</kbd> with <kbd>/opt/php70/bin/php</kbd>. | |||
'''Note!''' | |||
==System Maintenance== | ==System Maintenance== | ||
===Upgrade/Reinstall=== | ===Upgrade/Reinstall=== | ||
Use to upgrade across major versions or to reinstall | Use to upgrade across major versions or to reinstall a borked install | ||
# Get MediaWiki (per [https://www.mediawiki.org/wiki/Manual:Upgrading MediaWiki site]) | # Get MediaWiki (per [https://www.mediawiki.org/wiki/Manual:Upgrading MediaWiki site]) | ||
## Download desired version | ## 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 '' | ## 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 '' | ## Delete zipped tarball (''e.g.'', <code>rm ''mediawiki stable release number.tar.gz''</code>) | ||
# Copy customized files to new install (per [https://www.mediawiki.org/wiki/Manual:Upgrading MediaWiki site]) | # Copy customized files to new install (per [https://www.mediawiki.org/wiki/Manual:Upgrading MediaWiki site]) | ||
## Copy Localsettings.php (''e.g.'', <code>cp | ## Copy Localsettings.php (''e.g.'', <code>cp public_html/clubwiki/LocalSettings.php ~/''mediawiki stable release number''/</code>) | ||
## Copy Images folder (''e.g.'', <code>cp -R public_html/clubwiki/images/ ~/''mediawiki stable release number''/</code>) | |||
## Copy Images folder (''e.g.'', <code>cp -R | ## Copy kml folder (''e.g.'', <code>cp -R public_html/clubwiki/kml/ ~/''mediawiki stable release number''/</code>) | ||
## Copy | |||
# Move over to new install (per [https://www.mediawiki.org/wiki/Manual:Upgrading MediaWiki site]) | # Move over to new install (per [https://www.mediawiki.org/wiki/Manual:Upgrading MediaWiki site]) | ||
##Move the existing installation to a temporary backup folder <code>mv ~/public_html/clubwiki/ OLD.yyyymmdd.clubwiki</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 '' | ## Move the new installation to the public folder <code>mv ~/''mediawiki stable release number'' ~/public_html/clubwiki</code> | ||
# | # Install extensions/handlers | ||
# | ## [https://getcomposer.org/download/ Composer] except syntax to use php v7.0. | ||
# | ## [https://www.semantic-mediawiki.org/wiki/Help:Installation/Using_Composer_with_MediaWiki_1.25%2B Semantic MediaWiki] using Composer except syntax to use php v7.0 - Ensure to specify the most recent/desired version of software! | ||
## | ## [https://www.mediawiki.org/wiki/Extension:NumberFormat NumberFormat] - Download extension and extract into the extension directory <code>tar -xzf extension.tar.gz -C ~/public_html/clubwiki/extensions/</code> | ||
## May need to ctrl-shift-R to force reload pages to avoid seeing errors | ## [https://github.com/JeroenDeDauw/Maps/blob/master/INSTALL.md Maps] using Composer except syntax to use php v7.0. Start at step 2. | ||
## [https://www.mediawiki.org/wiki/Extension:Page_Forms/Download_and_installation Page Forms] - Download extension and extract into the extension directory <code>tar -xzf extension.tar.gz -C ~/public_html/clubwiki/extensions/</code> | |||
## [https://www.semantic-mediawiki.org/wiki/Semantic_Result_Formats Semantic result formats] using Composer except syntax to use php v7.0. Ensure you specify most recent/desired version! | |||
## [https://www.mediawiki.org/wiki/Extension:Semantic_Compound_Queries Semantic Compound Queries] I tried to use Composer but it wasn't loading so manually installed at v1.1.0. Used for auto map of trails and parks | |||
## [https://www.mediawiki.org/wiki/Extension:Arrays Arrays] - Simple extension download. Used for array manipulation in templates | |||
## [https://www.mediawiki.org/wiki/Extension:Header_Tabs Header Tabs] - Allows turning form pages (or really any page) into tabbed pages | |||
# Run Mediawiki upgrade or command line update (per [https://www.mediawiki.org/wiki/Manual:Upgrading MediaWiki site]) | |||
# Done! (May need to ctrl-shift-R to force reload pages to avoid seeing errors) | |||
===Update MediaWiki=== | ===Update MediaWiki=== | ||
Line 72: | Line 33: | ||
# Download patch from the [http://dumps.wikimedia.org/mediawiki/ dumps site] | # Download patch from the [http://dumps.wikimedia.org/mediawiki/ dumps site] | ||
# <kbd>cd</kbd> to <code>cd ~/public_html/clubwiki/</code> directory (the one with LocalSettings.php). | # <kbd>cd</kbd> to <code>cd ~/public_html/clubwiki/</code> directory (the one with LocalSettings.php). | ||
# Download (<kbd>wget</kbd>) the patch file from the [http://dumps.wikimedia.org/mediawiki/ dumps site] and <kbd>gunzip</kbd> it <code>gunzip '' | # Download (<kbd>wget</kbd>) the patch file from the [http://dumps.wikimedia.org/mediawiki/ dumps site] and <kbd>gunzip</kbd> it <code>gunzip ''mediawiki stable release number.patch''.gz</code>. | ||
# Use <code>patch -p1 --dry-run</code> to check what will be changed (''e.g.'', <code>patch -p1 --dry-run -i '' | # Use <code>patch -p1 --dry-run</code> to check what will be changed (''e.g.'', <code>patch -p1 --dry-run -i ''mediawiki stable release number.patch''</code>) | ||
# If all is well, run <kbd>patch</kbd> again without <code>--dry-run</code> | # If all is well, run <kbd>patch</kbd> again without <code>--dry-run</code>. | ||
# Check [[Special:Version]] and you should see the new version number in place. | # Check [[Special:Version]] and you should see the new version number in place. | ||
# Delete patch files <code>rm '' | # Delete patch files <code>rm ''mediawiki stable release number.patch''*</code> | ||
===Update extensions=== | ===Update extensions=== | ||
#Composer based (Semantic MediaWiki, Maps, and Semantic Result Formats) | #Composer based (Semantic MediaWiki, Maps, and Semantic Result Formats) | ||
## <kbd>cd</kbd> to <code>cd ~/public_html/clubwiki/</code> directory (the one with LocalSettings.php). | ## <kbd>cd</kbd> to <code>cd ~/public_html/clubwiki/</code> directory (the one with LocalSettings.php). | ||
## Update composer <code> | ## Update composer <code>/opt/php70/bin/php composer.phar self-update</code> | ||
## Update using composer <code> | ## Update using composer <code>/opt/php70/bin/php composer.phar update --no-dev</code> | ||
# Manual extensions - Go to [[Special:Version]] and compare what's shown on extension page | # Manual extensions - Go to [[Special:Version]] and compare what's shown on extension page | ||
## [https://www.mediawiki.org/wiki/Extension:NumberFormat NumberFormat] - Download needed updates and extract into the extension directory <code>tar -xzf extension.tar.gz -C public_html/clubwiki/extensions/</code> | ## [https://www.mediawiki.org/wiki/Extension:NumberFormat NumberFormat] - Download needed updates and extract into the extension directory <code>tar -xzf extension.tar.gz -C public_html/clubwiki/extensions/</code> | ||
## [https://www.mediawiki.org/wiki/Extension:Page_Forms/Download_and_installation Page Forms] - Download extension and | ## [https://www.mediawiki.org/wiki/Extension:Page_Forms/Download_and_installation Page Forms] - Download extension and extract into the extension directory <code>tar -xzf extension.tar.gz -C public_html/clubwiki/extensions/</code> | ||
## [https://www.mediawiki.org/wiki/Extension:Arrays Arrays] - Upload new version into extension folder | ## [https://www.mediawiki.org/wiki/Extension:Arrays Arrays] - Upload new version into extension folder | ||
## [https://www.mediawiki.org/wiki/Extension:Header_Tabs Header Tabs] - Upload new version into extension folder | ## [https://www.mediawiki.org/wiki/Extension:Header_Tabs Header Tabs] - Upload new version into extension folder | ||
# Remaining extensions are part of MediaWiki and upgraded with it | # Remaining extensions are part of MediaWiki and upgraded with it | ||
# Update completion - run maintenance routine from <code>cd ~/public_html/clubwiki/</code> directory: <code> | # Update completion - run maintenance routine from <code>cd ~/public_html/clubwiki/</code> directory: <code>/opt/php70/bin/php maintenance/update.php</code> | ||
==Site Maintenance== | ==Site Maintenance== | ||
Cleanup after a spam/vandalism battle | Cleanup after a spam/vandalism battle | ||
# <kbd>cd</kbd> to <code>cd ~/public_html/clubwiki/</code> directory (the one with LocalSettings.php) | # <kbd>cd</kbd> to <code>cd ~/public_html/clubwiki/</code> directory (the one with LocalSettings.php) | ||
# Delete archived revisions (deleted page revisions) <code> | # Delete archived revisions (deleted page revisions) <code>/opt/php70/bin/php maintenance/deleteArchivedRevisions.php</code> for dry run, then execute <code>/opt/php70/bin/php maintenance/deleteArchivedRevisions.php --delete</code> | ||
# Delete users older than 7 days with no edits <code> | # Delete users older than 7 days with no edits <code>/opt/php70/bin/php maintenance/removeUnusedAccounts.php --ignore-touched 7</code> for dry run, then execute <code>/opt/php70/bin/php maintenance/removeUnusedAccounts.php --ignore-touched 7 --delete</code> |