TEHCC Wiki:Maintenance: Difference between revisions

From TEHCC Wiki
Jump to navigation Jump to search
(→‎Update extensions: add no-dev param)
m (update for mediawiki upgrade)
 
(70 intermediate revisions by the same user not shown)
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>.
{{#arraydefine:phpcommand|php}}<!-- Load with any special directory specifying required to access desired version of php -->
{{#arraydefine:mwInstallVersion|mediawiki-1.38.7}}<!-- Use to update examples to be useful -->
'''Note!''' Current host doesn't have issue with calling old versions of php. So, when instructions call for <kbd>php</kbd> you can just use <kbd>{{#arrayprint:phpcommand}}</kbd>. The variable code left in, in the event that ever changes again.
 
==Installed Extensions Reference==
The following extensions are used for the listed purposes. '''GetUserName''' is left installed but not enabled in LocalSettings. MyVariables is throwing on error in debugging.
* Composer based extensions
** [https://getcomposer.org/download/ Composer] - per [https://www.mediawiki.org/wiki/Composer/For_extensions Mediawiki] site in wiki root folder. Used to install Composer packages and dependencies
** [https://www.semantic-mediawiki.org/wiki/Help:Installation/Quick_guide Semantic MediaWiki] - whole site revolves around it
** [https://github.com/JeroenDeDauw/Maps/blob/master/INSTALL.md Maps] - For the embedded interactive maps
** [https://www.semantic-mediawiki.org/wiki/Semantic_Result_Formats Semantic result formats] - permits semantic queries to other formats, I know array type is used by complex templates but I'm sure others have been used as well
** [https://www.mediawiki.org/wiki/Extension:Semantic_Compound_Queries Semantic Compound Queries] - permits advanced queries notably used in complex map templates
** [https://github.com/ProfessionalWiki/ModernTimeline Modern Timeline Result Format] - Permits a more actively supported and better looking timeline for hike logs
* Manually installed extensions
** [https://www.mediawiki.org/wiki/Extension:NumberFormat NumberFormat] - Used to format numbers. SMW sum'd results are not natively able to be formatted.
** [https://www.mediawiki.org/wiki/Extension:Page_Forms/Download_and_installation Page Forms] - Makes the form editing of pages possible
** [https://www.mediawiki.org/wiki/Extension:Arrays Arrays] - Used for array creation and manipulation, including this page
** [https://www.mediawiki.org/wiki/Extension:Header_Tabs Header Tabs] - Allows turning form pages (or really any page) into tabbed pages
** [https://www.mediawiki.org/wiki/Extension:MyVariables MyVariables] - Allows referencing logged in user for form automation used for links and forms to hike logs and lists
** [https://www.mediawiki.org/wiki/Extension:GetUserName GetUserName] - Alternative for MyVariables but doesn't have a "blank if not logged in" option or feature
** [https://www.mediawiki.org/wiki/Extension:SimpleTable SimpleTable] - Allows simple table definition, specifically easily working with a CSV list
** [https://www.mediawiki.org/wiki/Extension:UrlGetParameters UrlGetParameters] - Allows use of a GET parameter in a link to be used by the page code. Used for Hike Logs.
** [https://www.mediawiki.org/wiki/Extension:MediaFunctions MediaFunctions] - Can retrieve location from photo EXIF (and other information). Planned use for map charting photos including maintenance needs.


==System Maintenance==
==System Maintenance==


===Upgrade/Reinstall===
===Upgrade/Reinstall===
Use to upgrade across major versions or to reinstall a borked install
Use to upgrade across major versions or to reinstall after a borked update.
<p>General wisdom is to wait for the x.1 release before upgrading.
<p>'''Note!''' The example commands below are using a page array variable. Edit the page to update the variable for your target installation to ease copy-n-paste of commands. Examples currently using <kbd>{{#arrayprint:mwInstallVersion}}</kbd>.
# Precheck!
## These steps have worked for upgrades in the past, but a reality check with any new versions and [https://www.mediawiki.org/wiki/Manual:Upgrading MediaWiki's Upgrade Procedure] is always prudent.
## Check requirements vs. what the current [[Special:Version|Version Page]] is showing!
### Primarily PHP as the host's slow version updating and PHP's aggressive deprecation have been a problem.
### Verify used extensions are compatible with the MediaWiki version you are moving to. SMW and Maps are two that hook deep and seemingly subject to version requirements. (SMW v4.0.2 supports up through MW 1.37).
## Run the [[#Update extensions|Update extensions]] procedure below to ensure everything is up to date prior to upgrade. We will copy Composer and manual extensions from the current installation for ease of upgrade.
## Include running the maintenance update and runJobs.
# 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 [https://www.mediawiki.org/wiki/Download MediaWiki Site] using <kbd>wget</kbd> to the home directory
## Download desired version from the [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>)
## Unpack using <kbd>tar -xvzf</kbd> (''e.g.'', <code>tar -xvzf ''{{#arrayprint:mwInstallVersion}}.tar.gz''</code>)
## Delete zipped tarball (''e.g.'', <code>rm ''mediawiki stable release number.tar.gz''</code>)
## Delete zipped tarball (''e.g.'', <code>rm ''{{#arrayprint:mwInstallVersion}}.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
## Copy Localsettings.php (''e.g.'', <code>cp ~/public_html/clubwiki/LocalSettings.php ''{{#arrayprint:mwInstallVersion}}''/</code>)
## Copy Images folder
## Copy kml folder (''e.g.'', <code>cp -R ~/public_html/clubwiki/kml/ ''{{#arrayprint:mwInstallVersion}}''/</code>)
## Copy kml folder
## Copy Images folder (''e.g.'', <code>cp -R ~/public_html/clubwiki/images/ ''{{#arrayprint:mwInstallVersion}}''/</code>)
# Migrate manual extensions (Confirm this list is still accurate with the more actively used update procedure below)
## Copy Arrays (''e.g.'', <code>cp -R ~/public_html/clubwiki/extensions/Arrays/ {{#arrayprint:mwInstallVersion}}/extensions/</code>)
## Copy HeaderTabs (''e.g.'', <code>cp -R ~/public_html/clubwiki/extensions/HeaderTabs/ {{#arrayprint:mwInstallVersion}}/extensions/</code>)
## Copy MyVariables (''e.g.'', <code>cp -R ~/public_html/clubwiki/extensions/MyVariables/ {{#arrayprint:mwInstallVersion}}/extensions/</code>)
## Copy GetUserName (''e.g.'', <code>cp -R ~/public_html/clubwiki/extensions/GetUserName/ {{#arrayprint:mwInstallVersion}}/extensions/</code>)
## Copy NumberFormat (''e.g.'', <code>cp -R ~/public_html/clubwiki/extensions/NumberFormat/ {{#arrayprint:mwInstallVersion}}/extensions/</code>)
## Copy PageForms (''e.g.'', <code>cp -R ~/public_html/clubwiki/extensions/PageForms/ {{#arrayprint:mwInstallVersion}}/extensions/</code>)
## Copy SimpleTabs (''e.g.'', <code>cp -R ~/public_html/clubwiki/extensions/SimpleTable/ {{#arrayprint:mwInstallVersion}}/extensions/</code>)
## Copy UrlGetParameters (''e.g.'', <code>cp -R ~/public_html/clubwiki/extensions/UrlGetParameters/ {{#arrayprint:mwInstallVersion}}/extensions/</code>)
## Copy MediaFunctions (''e.g.'', <code>cp -R ~/public_html/clubwiki/extensions/MediaFunctions/ {{#arrayprint:mwInstallVersion}}/extensions/</code>)
# Migrate Composer (can also follow Mediawiki recommendations, but if you updated extensions first, this should be fine)
## Copy composer.local.json (''e.g.'', <code>cp ~/public_html/clubwiki/composer.local.json ''{{#arrayprint:mwInstallVersion}}''/</code>)
## Copy composer.phar (''e.g.'', <code>cp ~/public_html/clubwiki/composer.phar ''{{#arrayprint:mwInstallVersion}}''/</code>)
# 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/ ~/public_html/OLD.yyyymmdd.clubwiki</code>
##Move the existing installation to a temporary backup folder <code>mv ~/public_html/clubwiki/ OLD.yyyymmdd.clubwiki</code>
## Move the new installation to the public folder <code>mv ~/''mediawiki stable release number'' ~/public_html/clubwiki</code>
## Move the new installation to the public folder <code>mv ''{{#arrayprint:mwInstallVersion}}/'' ~/public_html/clubwiki</code>
# Install extensions/handlers
# Finish by repeating [[#Update extensions|Update extensions]] again. This will force composer to install composer packages and needed dependencies. Again include running the maintenance update and runJobs to complete the upgrade (instead of the web based upgrade).
## [https://getcomposer.org/download/ Composer] except syntax to use php v7.0.
# Check [[Special:Version]] and a page or two to confirm things are still working.
## [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!
# Lessons of the past...
## [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>
## If upgrade stalls to white screen, likely a specified extension is not installed, check list and add as needed
## [https://github.com/JeroenDeDauw/Maps/blob/master/INSTALL.md Maps] using Composer except syntax to use php v7.0. Start at step 2.
## May need to ctrl-shift-R to force reload pages to avoid seeing errors
## [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>
## Maps may instead display "Your browser is not compatible with Google Maps v3." but I think it goes away after a few minutes to hours.
## [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
# Run Mediawiki upgrade or command line update (per [https://www.mediawiki.org/wiki/Manual:Upgrading MediaWiki site])
# Done!
# Done!


Line 32: Line 72:
# 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 ''mediawiki stable release number.patch''.gz</code>.
# Download (<kbd>wget</kbd>) the patch file from the [http://dumps.wikimedia.org/mediawiki/ dumps site] and <kbd>gunzip</kbd> it <code>gunzip ''{{#arrayprint:mwInstallVersion}}.patch''.gz</code>.
# 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>)
# Use <code>patch -p1 --dry-run</code> to check what will be changed (''e.g.'', <code>patch -p1 --dry-run -i ''{{#arrayprint:mwInstallVersion}}.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> (''e.g.'', <code>patch -p1 -i ''{{#arrayprint:mwInstallVersion}}.patch''</code>).
# Update completion - run maintenance routine from <code>cd ~/public_html/clubwiki/</code> directory: <code>{{#arrayprint:phpcommand}} maintenance/update.php</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 ''mediawiki stable release number.patch''*</code>
# Delete patch files <code>rm ''{{#arrayprint:mwInstallVersion}}.patch''*</code>


===Update extensions===
===Update extensions===
'''NOTE''': I have often got errors or configuration screens from the site after updating extensions. These are typically resolved by running the maintenance routine below. Sometimes a single browser temporarily refused to work, yet a different browser behaved normally.
#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>/opt/php70/bin/php composer.phar self-update</code>
## Update composer <code>{{#arrayprint:phpcommand}} composer.phar self-update</code>
## Update using composer <code>/opt/php70/bin/php composer.phar update --no-dev</code>
## Update using composer <code>{{#arrayprint:phpcommand}} composer.phar update --no-dev</code>
# Composer extensions that need version number updated in <kbd>composer.local.json</kbd> <code>vi composer.local.json</code>
## [https://www.semantic-mediawiki.org/wiki/Semantic_MediaWiki Semantic MediaWiki]
## [https://github.com/JeroenDeDauw/Maps/blob/master/RELEASE-NOTES.md Maps]
## [https://github.com/SemanticMediaWiki/SemanticResultFormats/blob/master/RELEASE-NOTES.md Semantic Result Formats]
## [https://github.com/SemanticMediaWiki/SemanticCompoundQueries/blob/master/RELEASE-NOTES.md Semantic Compound Queries]
## [https://github.com/ProfessionalWiki/ModernTimeline ModernTimeline]
## Rerun composer update if there were any updates to perform <code>{{#arrayprint:phpcommand}} 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 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 copy into PageForms directory
### wget extension
### <code>unzip extension.zip</code>
### <code>cp -R ''folder unzip made''/* ~/public_html/clubwiki/extensions/PageForms/</code> (remember the asterisk!)
### Refresh Version page to confirm update worked
### <code>rm -rf ''folder unzip made''/</code>
### <code>rm extension.zip</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:MyVariables MyVariables] - Upload new version into extension folder
## [https://www.mediawiki.org/wiki/Extension:GetUserName GetUserName] - Upload new version into extension folder
## [https://www.mediawiki.org/wiki/Extension:SimpleTable SimpleTable] - Upload new version into extension folder
## [https://www.mediawiki.org/wiki/Extension:UrlGetParameters UrlGetParameters] - Upload new version into extension folder
## [https://www.mediawiki.org/wiki/Extension:MediaFunctions MediaFunctions] - 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>/opt/php70/bin/php maintenance/update.php</code>
# Update completion - run maintenance routine from <code>cd ~/public_html/clubwiki/</code> directory: <code>{{#arrayprint:phpcommand}} maintenance/update.php</code>
# Finish any residual jobs - run manual maintenance runJobs from <code>cd ~/public_html/clubwiki/</code> directory: <code>{{#arrayprint:phpcommand}} maintenance/runJobs.php --maxjobs 1000</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>/opt/php70/bin/php maintenance/deleteArchivedRevisions.php</code> for dry run, then execute <code>/opt/php70/bin/php maintenance/deleteArchivedRevisions.php --delete</code>
# Delete archived revisions (deleted page revisions) <code>{{#arrayprint:phpcommand}} maintenance/deleteArchivedRevisions.php</code> for dry run, then execute <code>{{#arrayprint:phpcommand}} maintenance/deleteArchivedRevisions.php --delete</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>
# Delete users older than 7 days with no edits <code>{{#arrayprint:phpcommand}} maintenance/removeUnusedAccounts.php --ignore-touched 7</code> for dry run, then execute <code>{{#arrayprint:phpcommand}} maintenance/removeUnusedAccounts.php --ignore-touched 7 --delete</code>

Latest revision as of 08:17, 19 August 2023


Note! Current host doesn't have issue with calling old versions of php. So, when instructions call for php you can just use php. The variable code left in, in the event that ever changes again.

Installed Extensions Reference[edit]

The following extensions are used for the listed purposes. GetUserName is left installed but not enabled in LocalSettings. MyVariables is throwing on error in debugging.

  • Composer based extensions
  • Manually installed extensions
    • NumberFormat - Used to format numbers. SMW sum'd results are not natively able to be formatted.
    • Page Forms - Makes the form editing of pages possible
    • Arrays - Used for array creation and manipulation, including this page
    • Header Tabs - Allows turning form pages (or really any page) into tabbed pages
    • MyVariables - Allows referencing logged in user for form automation used for links and forms to hike logs and lists
    • GetUserName - Alternative for MyVariables but doesn't have a "blank if not logged in" option or feature
    • SimpleTable - Allows simple table definition, specifically easily working with a CSV list
    • UrlGetParameters - Allows use of a GET parameter in a link to be used by the page code. Used for Hike Logs.
    • MediaFunctions - Can retrieve location from photo EXIF (and other information). Planned use for map charting photos including maintenance needs.

System Maintenance[edit]

Upgrade/Reinstall[edit]

Use to upgrade across major versions or to reinstall after a borked update.

General wisdom is to wait for the x.1 release before upgrading.

Note! The example commands below are using a page array variable. Edit the page to update the variable for your target installation to ease copy-n-paste of commands. Examples currently using mediawiki-1.38.7.

  1. Precheck!
    1. These steps have worked for upgrades in the past, but a reality check with any new versions and MediaWiki's Upgrade Procedure is always prudent.
    2. Check requirements vs. what the current Version Page is showing!
      1. Primarily PHP as the host's slow version updating and PHP's aggressive deprecation have been a problem.
      2. Verify used extensions are compatible with the MediaWiki version you are moving to. SMW and Maps are two that hook deep and seemingly subject to version requirements. (SMW v4.0.2 supports up through MW 1.37).
    3. Run the Update extensions procedure below to ensure everything is up to date prior to upgrade. We will copy Composer and manual extensions from the current installation for ease of upgrade.
    4. Include running the maintenance update and runJobs.
  2. Get MediaWiki (per MediaWiki site)
    1. Download desired version from the MediaWiki Site using wget to the home directory
    2. Unpack using tar -xvzf (e.g., tar -xvzf mediawiki-1.38.7.tar.gz)
    3. Delete zipped tarball (e.g., rm mediawiki-1.38.7.tar.gz)
  3. Copy customized files to new install (per MediaWiki site)
    1. Copy Localsettings.php (e.g., cp ~/public_html/clubwiki/LocalSettings.php mediawiki-1.38.7/)
    2. Copy kml folder (e.g., cp -R ~/public_html/clubwiki/kml/ mediawiki-1.38.7/)
    3. Copy Images folder (e.g., cp -R ~/public_html/clubwiki/images/ mediawiki-1.38.7/)
  4. Migrate manual extensions (Confirm this list is still accurate with the more actively used update procedure below)
    1. Copy Arrays (e.g., cp -R ~/public_html/clubwiki/extensions/Arrays/ mediawiki-1.38.7/extensions/)
    2. Copy HeaderTabs (e.g., cp -R ~/public_html/clubwiki/extensions/HeaderTabs/ mediawiki-1.38.7/extensions/)
    3. Copy MyVariables (e.g., cp -R ~/public_html/clubwiki/extensions/MyVariables/ mediawiki-1.38.7/extensions/)
    4. Copy GetUserName (e.g., cp -R ~/public_html/clubwiki/extensions/GetUserName/ mediawiki-1.38.7/extensions/)
    5. Copy NumberFormat (e.g., cp -R ~/public_html/clubwiki/extensions/NumberFormat/ mediawiki-1.38.7/extensions/)
    6. Copy PageForms (e.g., cp -R ~/public_html/clubwiki/extensions/PageForms/ mediawiki-1.38.7/extensions/)
    7. Copy SimpleTabs (e.g., cp -R ~/public_html/clubwiki/extensions/SimpleTable/ mediawiki-1.38.7/extensions/)
    8. Copy UrlGetParameters (e.g., cp -R ~/public_html/clubwiki/extensions/UrlGetParameters/ mediawiki-1.38.7/extensions/)
    9. Copy MediaFunctions (e.g., cp -R ~/public_html/clubwiki/extensions/MediaFunctions/ mediawiki-1.38.7/extensions/)
  5. Migrate Composer (can also follow Mediawiki recommendations, but if you updated extensions first, this should be fine)
    1. Copy composer.local.json (e.g., cp ~/public_html/clubwiki/composer.local.json mediawiki-1.38.7/)
    2. Copy composer.phar (e.g., cp ~/public_html/clubwiki/composer.phar mediawiki-1.38.7/)
  6. Move over to new install (per MediaWiki site)
    1. Move the existing installation to a temporary backup folder mv ~/public_html/clubwiki/ OLD.yyyymmdd.clubwiki
    2. Move the new installation to the public folder mv mediawiki-1.38.7/ ~/public_html/clubwiki
  7. Finish by repeating Update extensions again. This will force composer to install composer packages and needed dependencies. Again include running the maintenance update and runJobs to complete the upgrade (instead of the web based upgrade).
  8. Check Special:Version and a page or two to confirm things are still working.
  9. Lessons of the past...
    1. If upgrade stalls to white screen, likely a specified extension is not installed, check list and add as needed
    2. May need to ctrl-shift-R to force reload pages to avoid seeing errors
    3. Maps may instead display "Your browser is not compatible with Google Maps v3." but I think it goes away after a few minutes to hours.
  10. Done!

Update MediaWiki[edit]

Patch - Available for point releases. Details on the MediaWiki site

  1. Download patch from the dumps site
  2. cd to cd ~/public_html/clubwiki/ directory (the one with LocalSettings.php).
  3. Download (wget) the patch file from the dumps site and gunzip it gunzip mediawiki-1.38.7.patch.gz.
  4. Use patch -p1 --dry-run to check what will be changed (e.g., patch -p1 --dry-run -i mediawiki-1.38.7.patch)
  5. If all is well, run patch again without --dry-run (e.g., patch -p1 -i mediawiki-1.38.7.patch).
  6. Update completion - run maintenance routine from cd ~/public_html/clubwiki/ directory: php maintenance/update.php
  7. Check Special:Version and you should see the new version number in place.
  8. Delete patch files rm mediawiki-1.38.7.patch*

Update extensions[edit]

NOTE: I have often got errors or configuration screens from the site after updating extensions. These are typically resolved by running the maintenance routine below. Sometimes a single browser temporarily refused to work, yet a different browser behaved normally.

  1. Composer based (Semantic MediaWiki, Maps, and Semantic Result Formats)
    1. cd to cd ~/public_html/clubwiki/ directory (the one with LocalSettings.php).
    2. Update composer php composer.phar self-update
    3. Update using composer php composer.phar update --no-dev
  2. Composer extensions that need version number updated in composer.local.json vi composer.local.json
    1. Semantic MediaWiki
    2. Maps
    3. Semantic Result Formats
    4. Semantic Compound Queries
    5. ModernTimeline
    6. Rerun composer update if there were any updates to perform php composer.phar update --no-dev
  3. Manual extensions - Go to Special:Version and compare what's shown on extension page
    1. NumberFormat - Download needed updates and extract into the extension directory tar -xzf extension.tar.gz -C public_html/clubwiki/extensions/
    2. Page Forms - Download extension and copy into PageForms directory
      1. wget extension
      2. unzip extension.zip
      3. cp -R folder unzip made/* ~/public_html/clubwiki/extensions/PageForms/ (remember the asterisk!)
      4. Refresh Version page to confirm update worked
      5. rm -rf folder unzip made/
      6. rm extension.zip
    3. Arrays - Upload new version into extension folder
    4. Header Tabs - Upload new version into extension folder
    5. MyVariables - Upload new version into extension folder
    6. GetUserName - Upload new version into extension folder
    7. SimpleTable - Upload new version into extension folder
    8. UrlGetParameters - Upload new version into extension folder
    9. MediaFunctions - Upload new version into extension folder
  4. Remaining extensions are part of MediaWiki and upgraded with it
  5. Update completion - run maintenance routine from cd ~/public_html/clubwiki/ directory: php maintenance/update.php
  6. Finish any residual jobs - run manual maintenance runJobs from cd ~/public_html/clubwiki/ directory: php maintenance/runJobs.php --maxjobs 1000

Site Maintenance[edit]

Cleanup after a spam/vandalism battle

  1. cd to cd ~/public_html/clubwiki/ directory (the one with LocalSettings.php)
  2. Delete archived revisions (deleted page revisions) php maintenance/deleteArchivedRevisions.php for dry run, then execute php maintenance/deleteArchivedRevisions.php --delete
  3. Delete users older than 7 days with no edits php maintenance/removeUnusedAccounts.php --ignore-touched 7 for dry run, then execute php maintenance/removeUnusedAccounts.php --ignore-touched 7 --delete