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:
{{#arraydefine:phpcommand|php}}<!-- Load with any special directory specifying required to access desired version of php -->
{{#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!''' On the command line, you no longer need to specify the location of the latest version of php. When it calls for <kbd>php</kbd> you simply use <kbd>{{#arrayprint:phpcommand}}</kbd>.
'''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 after a borked update.
Use to upgrade across major versions or to reinstall a borked install
<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 from the [https://www.mediawiki.org/wiki/Download MediaWiki Site] using <kbd>wget</kbd> to the home directory
## 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 ''{{#arrayprint:mwInstallVersion}}.tar.gz''</code>)
## 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 ''{{#arrayprint:mwInstallVersion}}.tar.gz''</code>)
## 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 ~/public_html/clubwiki/LocalSettings.php ''{{#arrayprint:mwInstallVersion}}''/</code>)
## Copy Localsettings.php (''e.g.'', <code>cp public_html/clubwiki/LocalSettings.php ~/''mediawiki stable release number''/</code>)
## Copy kml folder (''e.g.'', <code>cp -R ~/public_html/clubwiki/kml/ ''{{#arrayprint:mwInstallVersion}}''/</code>)
## Copy composer.local.json (''e.g.'', <code>cp public_html/clubwiki/composer.local.json ~/''mediawiki stable release number''/</code>)
## Copy Images folder (''e.g.'', <code>cp -R ~/public_html/clubwiki/images/ ''{{#arrayprint:mwInstallVersion}}''/</code>)
## Copy kml folder (''e.g.'', <code>cp -R public_html/clubwiki/kml/ ~/''mediawiki stable release number''/</code>)
# Migrate manual extensions (Confirm this list is still accurate with the more actively used update procedure below)
## Copy Images folder (''e.g.'', <code>cp -R public_html/clubwiki/images/ ~/''mediawiki stable release number''/</code>)
## 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/ 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 ''{{#arrayprint:mwInstallVersion}}/'' ~/public_html/clubwiki</code>
## Move the new installation to the public folder <code>mv ~/''mediawiki stable release number'' ~/public_html/clubwiki</code>
# 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).
# Install extensions/handlers
# Check [[Special:Version]] and a page or two to confirm things are still working.
## [https://getcomposer.org/download/ Composer] - per [https://www.mediawiki.org/wiki/Composer/For_extensions Mediawiki] site in wiki root folder, run <code>Web host doesn't like my link to get composer command</code> then <code>php composer.phar self-update</code>
# Lessons of the past...
## Add composer based extensions to requirements list, create as needed <code>vi composer.local.json</code> - Ensure you specify the most recent/desired versions
## If upgrade stalls to white screen, likely a specified extension is not installed, check list and add as needed
### [https://www.semantic-mediawiki.org/wiki/Help:Installation/Quick_guide Semantic MediaWiki] - whole site revolves around it
## May need to ctrl-shift-R to force reload pages to avoid seeing errors
### [https://github.com/JeroenDeDauw/Maps/blob/master/INSTALL.md Maps] - For the embedded interactive maps
## 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] - 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
# Done!
### [https://www.mediawiki.org/wiki/Extension:Semantic_Compound_Queries Semantic Compound Queries] - permits advanced queries notably used in complex map templates
## Update/install specified extensions using composer <code>php composer.phar update --no-dev</code>
## [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>
## [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] - 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
## [https://www.mediawiki.org/wiki/Extension:MyVariables MyVariables] - Allows referencing logged in user for form automation
## {https://www.mediawiki.org/wiki/Extension:SimpleTable SimpleTable] - Allows simple table definition, specifically easily working with a CSV list, install by creating file as specified
# Run Mediawiki upgrade or command line update (per [https://www.mediawiki.org/wiki/Manual:Upgrading MediaWiki site])
## Lessons of the past...
### If upgrade stalls to white screen, likely a specified extension is not installed, check list and add as needed
# Done! (May need to ctrl-shift-R to force reload pages to avoid seeing errors)


===Update MediaWiki===
===Update MediaWiki===
Line 72: Line 41:
# 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 ''{{#arrayprint:mwInstallVersion}}.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 ''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 ''{{#arrayprint:mwInstallVersion}}.patch''</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>)
# If all is well, run <kbd>patch</kbd> again without <code>--dry-run</code> (''e.g.'', <code>patch -p1 -i ''{{#arrayprint:mwInstallVersion}}.patch''</code>).
# If all is well, run <kbd>patch</kbd> again without <code>--dry-run</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 ''{{#arrayprint:mwInstallVersion}}.patch''*</code>
# Delete patch files <code>rm ''mediawiki stable release number.patch''*</code>


===Update extensions===
===Update extensions===
Line 90: Line 58:
## [https://github.com/SemanticMediaWiki/SemanticResultFormats/blob/master/RELEASE-NOTES.md Semantic Result Formats]
## [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/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>
## 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 copy into PageForms directory  
## [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>
### 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: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: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: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>{{#arrayprint:phpcommand}} maintenance/update.php</code>
# Update completion - run maintenance routine from <code>cd ~/public_html/clubwiki/</code> directory: <code>{{#arrayprint:phpcommand}} maintenance/update.php</code>
Please note that all contributions to TEHCC Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see TEHCC Wiki:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)