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|/opt/cpanel/ea-php73/root/usr/bin/php}}<!-- Load with any special directory specifying required to access desired version of php --> | ||
{{#arraydefine:mwInstallVersion|mediawiki-1. | {{#arraydefine:mwInstallVersion|mediawiki-1.34.1}}<!-- Use to update examples to be useful --> | ||
'''Note!''' | '''Note!''' While using <kbd>php</kbd> uses PHP v7.0 which appears sufficient, the site actually runs on PHP v7.3. To ensure no oddity of running update scripts with a different version of php, when instructions call for <kbd>php</kbd> you instead use <kbd>{{#arrayprint:phpcommand}}</kbd>. | ||
==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 update. | ||
<p>General wisdom is to wait for the x.1 release before upgrading. | <p>General wisdom is to wait for the x.1 release before upgrading. | ||
<p>'''Note!''' The | <p>'''Note!''' The examples 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! | # 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. | ## 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! | ## 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. | ||
## 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. | ## 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. | ## Include running the maintenance update and runJobs. | ||
Line 41: | Line 20: | ||
## Delete zipped tarball (''e.g.'', <code>rm ''{{#arrayprint:mwInstallVersion}}.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 (''e.g.'', <code>cp | ## Copy Localsettings.php (''e.g.'', <code>cp public_html/clubwiki/LocalSettings.php ~/''{{#arrayprint:mwInstallVersion}}''/</code>) | ||
## Copy kml folder (''e.g.'', <code>cp -R | ## Copy kml folder (''e.g.'', <code>cp -R public_html/clubwiki/kml/ ~/''{{#arrayprint:mwInstallVersion}}''/</code>) | ||
## Copy Images folder (''e.g.'', <code>cp -R | ## 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) | # Migrate manual extensions (Confirm this list is still accurate with the more actively used update procedure below) | ||
## Copy Arrays (''e.g.'', <code>cp -R | ## Copy Arrays (''e.g.'', <code>cp -R public_html/clubwiki/extensions/Arrays/ ~/{{#arrayprint:mwInstallVersion}}/extensions/</code>) | ||
## Copy HeaderTabs (''e.g.'', <code>cp -R | ## Copy HeaderTabs (''e.g.'', <code>cp -R public_html/clubwiki/extensions/HeaderTabs/ ~/{{#arrayprint:mwInstallVersion}}/extensions/</code>) | ||
## Copy MyVariables (''e.g.'', <code>cp -R | ## Copy MyVariables (''e.g.'', <code>cp -R public_html/clubwiki/extensions/MyVariables/ ~/{{#arrayprint:mwInstallVersion}}/extensions/</code>) | ||
## Copy NumberFormat (''e.g.'', <code>cp -R public_html/clubwiki/extensions/NumberFormat/ ~/{{#arrayprint:mwInstallVersion}}/extensions/</code>) | |||
## Copy NumberFormat (''e.g.'', <code>cp -R | ## Copy PageForms (''e.g.'', <code>cp -R public_html/clubwiki/extensions/PageForms/ ~/{{#arrayprint:mwInstallVersion}}/extensions/</code>) | ||
## Copy PageForms (''e.g.'', <code>cp -R | ## Copy SimpleTabs (''e.g.'', <code>cp public_html/clubwiki/extensions/SimpleTable.php ~/{{#arrayprint:mwInstallVersion}}/extensions/</code>) | ||
## Copy SimpleTabs (''e.g.'', <code>cp | |||
# Migrate Composer (can also follow Mediawiki recommendations, but if you updated extensions first, this should be fine) | # 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 | ## Copy composer.local.json (''e.g.'', <code>cp public_html/clubwiki/composer.local.json ~/''{{#arrayprint:mwInstallVersion}}''/</code>) | ||
## Copy composer.phar (''e.g.'', <code>cp | ## 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 ~/''{{#arrayprint:mwInstallVersion}}/'' ~/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). | # 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). | ||
# Check [[Special:Version]] and a page or two to confirm things are still working. | # Check [[Special:Version]] and a page or two to confirm things are still working. | ||
Line 65: | Line 41: | ||
## If upgrade stalls to white screen, likely a specified extension is not installed, check list and add as needed | ## If upgrade stalls to white screen, likely a specified extension is not installed, check list and add as needed | ||
## May need to ctrl-shift-R to force reload pages to avoid seeing errors | ## May need to ctrl-shift-R to force reload pages to avoid seeing errors | ||
# Done! | # Done! | ||
Line 74: | Line 49: | ||
# 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 ''{{#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 ''{{#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 ''{{#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>. | ||
# 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 ''{{#arrayprint:mwInstallVersion}}.patch''*</code> | ||
Line 90: | Line 64: | ||
## [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] | ||
## 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 | ## [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 | ||
## [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:SimpleTable SimpleTable] - Upload new version into extension folder | ## [https://www.mediawiki.org/wiki/Extension:SimpleTable SimpleTable] - 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> |