Difference between revisions of "Mediawiki maintenance"

From Biowikifarm Metawiki
Jump to: navigation, search
m (Refresh SemanticMW data: +refresh category)
 
(43 intermediate revisions by 5 users not shown)
Line 46: Line 46:
 
</source>
 
</source>
  
==MediaWiki version upgrading==
+
==MediaWiki version upgrading ==
  
To upgrade Mediawiki first run the update on the staging version (= testwiki, http://biowikifarm.net/test):
+
=== Core and wikimedia-base extensions {{anchor|mw core and base extensions}} ===
<source lang="bash">
+
# Test for unwanted local changes:
+
cd /usr/share/mediawikistaging/; sudo svn status phase3 extensions;
+
  
  # If necessary, reset any unwanted local changes:
+
  # 1. Update the git clone on biowikifarm:
  ### cd /usr/share/mediawikistaging/; sudo svn revert -R phase3 extensions;  
+
  cd /usr/share/mw-wmf-clone/core; sudo git fetch;  
  # restore modified icons reverted above:
+
  cd ../extensions; sudo git pull; sudo git submodule update --init --recursive;
### sudo cp /usr/share/mediawiki/extensions/SemanticMediaWiki/skins/images/smw_button.png ./extensions/SemanticMediaWiki/skins/images/
+
  cd ../skins; sudo git pull; sudo git submodule update --init --recursive;
  ### sudo cp /usr/share/mediawiki/phase3/skins/common/images/poweredby_mediawiki_88x31.png ./phase3/skins/common/images/
+
+
# MAIN UPDATING:
+
cd /usr/share/mediawikistaging/; sudo svn update phase3 extensions  -r100100
+
  sudo /usr/sbin/apache2ctl -k graceful && sudo service nginx restart && sudo service php5-fpm restart
+
# Optionally other updates:
+
sudo apt-get update; sudo apt-get upgrade
+
</source>
+
  
: Note: when trying to find the precise svn version that is causing a bug within a range of versions (e.g. r100281 to 102570), the following command shows which versions apply to the present SVN folders at all: cd /usr/share/mediawikistaging/phase3 sudo svn log -r100281:102570 -q
+
----
  
After testing and verifying functionality, also update the production version (where "-r100100" indicates to update to revision 52502; this should always be the value of the tested revision from staging / test wiki!):
+
Core and extensions are exported by a tar archive export out of a git clone. This works for creating the first version as well as updating. (Suggestion: before starting the script do a sudo command, e.g. <code>sudo ls</code> so the bash prompt knows your password and you don't have to give your password over and over again). DO NOT RUN THIS SCRIPT ENTIRELY and be fully AWARE OF WHAT YOU EXACTLY DO.
 +
 
 +
How the structure is intended:
 +
  mw-wmf-clone
 +
  ├ core (Git) ─────────git-archive-export───┐
 +
  └ extensions (Git) ───git-archive-export─→ ) ─┐
 +
                                            │  │
 +
    wiki-source-LTS (e.g. REL1_23)          │  │
 +
    ┌ core-files (local git archive-export) ←┘  │
 +
    ├ extensions (mixed:                        │
 +
    │  svn biowikifarm, (repo: as svn-post-commit)
 +
    │  git-archive-export)  ←──────────────────┘
 +
    │
 +
    ↓ 
 +
    │ web-wiki (as LTS web Wiki)
 +
    ├─→ core-files (linked)
 +
    └─→ extensions (linked)
 +
 
 +
<syntaxhighlight lang="bash" style="font-size:105%;border-left:1px solid gray;padding-left:1em;">
 +
# variables
 +
  git_mw_basedir="/usr/share/mw-wmf-clone"
 +
  git_mw_core_source_dir="${git_mw_basedir}/core"
 +
  git_mw_extension_source_dir="${git_mw_basedir}/extensions"
 +
  git_tag_wikiversion="1.20.7"
 +
  git_branch="origin/REL1_20" # if nothin gis specified this will be the default to extract
 +
  mw_LTS_version_source_path="/usr/share/mediawiki20"
 +
# 1. Update biowikifarm clone:
 +
  # UPGRADE step may not be necessary: upgrade changes from remote git source: fetch & merge
 +
  cd "${git_mw_core_source_dir}";
 +
    sudo git pull;
 +
    git branch -r | sort --version-sort # list branches
 +
    git tag -l | sort --version-sort # list tags
 +
  cd "${git_mw_extension_source_dir}";
 +
    sudo git pull; sudo git submodule update --init --recursive;
 +
    git branch -r | sort --version-sort # list branches
 +
    git tag -l | sort --version-sort # list tags
 +
 
 +
# 2. Export (git archive) a specific MediaWiki versions into other folders:
 +
# First Update Core only, create path if not yet present:
 +
if ! [ -d "${mw_LTS_version_source_path}" ]; then sudo mkdir "${mw_LTS_version_source_path}"; fi
 +
# note that git archive does not extract mw-config directory for install (?gitignored something?)
 +
cd "${git_mw_core_source_dir}"; sudo git archive $git_tag_wikiversion | sudo tar --extract --overwrite --directory="${mw_LTS_version_source_path}"
 +
  # Note: tar provides a "--recursive-unlink" option for extract, which removes the content of the target folder
 +
  #  However, our mediawiki installations require many additional files (svn, widget-right changes, smarty, commons-bot)
 +
  #  which would have to be manually restored. Therefore, DO NOT use --recursive-unlink !
 +
 
 +
# 3. Export (git archive) the extensions:
 +
# In list of extensions desired version is specified like the following examples:
 +
#  "SemanticMediaWiki"          → version HEAD + extension SemanticMediaWiki
 +
#  "SemanticMediaWiki, 1.8" → version  1.8 + extension SemanticMediaWiki
 +
## NOTE: DO NOT use SemanticCalendar - this is obsolete!!!
 +
EXTENSIONS="AccessControl
 +
AdminLinks
 +
APC
 +
Arrays
 +
ArticleFeedback
 +
ArticleFeedbackv5
 +
AssertEdit
 +
CategoryTree
 +
CentralAuth
 +
CentralNotice
 +
CharInsert
 +
CheckUser
 +
Cite
 +
cldr
 +
ClickTracking
 +
CodeEditor
 +
Collection
 +
ConditionalShowSection
 +
Configure
 +
ConfirmAccount
 +
ConfirmEdit
 +
ContactPage
 +
Contest
 +
ContributionReporting
 +
DataTransfer
 +
DiscussionThreading
 +
DismissableSiteNotice
 +
DoubleWiki
 +
DumpHTML
 +
DynamicPageList
 +
EmailCapture
 +
ExpandTemplates
 +
ExternalData
 +
FlaggedRevs
 +
FormPreloadPostCache
 +
Gadgets
 +
GlobalBlocking
 +
GlobalUsage
 +
GlobalUserGroups
 +
GraphViz
 +
HeaderTabs
 +
ImageMap
 +
InputBox
 +
Interlanguage
 +
intersection
 +
Interwiki
 +
LabeledSectionTransclusion
 +
LiquidThreads
 +
Lockdown
 +
Loops
 +
Maintenance
 +
Maps, 2.0.1
 +
Math
 +
MediaFunctions
 +
MobileFrontend
 +
MoodBar
 +
MwEmbedSupport
 +
MWSearch
 +
Nuke
 +
OAI
 +
OggHandler
 +
OpenID
 +
OpenSearchXml
 +
PagedTiffHandler
 +
ParserFunctions
 +
PdfHandler
 +
Persona
 +
Poem
 +
PrefSwitch
 +
ProofreadPage
 +
Quiz
 +
Renameuser
 +
ReplaceText
 +
RSS
 +
Scribunto
 +
SemanticCompoundQueries, 0.3.4
 +
SemanticDrilldown, 1.2.4
 +
SemanticForms, 2.5.1
 +
SemanticFormsInputs
 +
SemanticImageInput
 +
SemanticInternalObjects, 0.7
 +
SemanticMaps, 2.0
 +
SemanticMediaWiki, 1.8
 +
SemanticResultFormats, 1.8
 +
SemanticSignup
 +
SemanticWatchlist
 +
SimpleSurvey
 +
SocialProfile
 +
SpamBlacklist
 +
Sudo
 +
Suhosin
 +
SwiftCloudFiles
 +
SyntaxHighlight_GeSHi
 +
TimedMediaHandler
 +
TitleKey
 +
UploadLocal
 +
UploadWizard
 +
Validator, 0.5.1
 +
Variables
 +
Vector
 +
VipsScaler
 +
VisualEditor
 +
WebFonts
 +
Widgets
 +
WikiEditor
 +
WikiLove
 +
WikimediaMessages
 +
Wikibase
 +
WikibaseLib
 +
WikibaseSolr
 +
WikibaseQuery
 +
WikibaseDataModel
 +
WikibaseDatabase
 +
WikibaseQueryEngine
 +
Diff
 +
Ask
 +
DataValues
 +
DataTypes
 +
Serialization
 +
Push
 +
DeleteBatch"
 +
## Note: as of 2013-10, the extensions ValueParsers ValueFormatters ValueValidators
 +
##  mentioned in Wikibase install do not exist. Not checked any further -gh
 +
 
 +
  # --------------------------------------
 +
  # split line on ", ". If only one value, export HEAD, else first value is branch/tag. Example:
 +
  #  "SemanticMediaWiki, 1.8"
 +
  #      ↓                ↓
 +
  #  $this_extension  $this_clone_version
 +
  #  will export tag 1.8  otherwise $git_branch
 +
  # --------------------------------------
 +
  # NOTE: check the line (similar to ternary operator: if condition ? dothis : dootherthings)
 +
  # $( … ) substitutes/returns the command's output
 +
  # → if ext-check-with-comma == ext then (&&) "HEAD or $git_branch" else (||) version-string
 +
  # ${ext%,*}    from back  of $ext → delete shortest (%) or (%%) longest match
 +
  # ${ext#*,* }  from front of $ext → delete shortest (#) or (##) longest match
 +
  # --------------------------------------
 +
mw_LTS_version_source_extension_path="${mw_LTS_version_source_path}/extensions"
 +
this_ext_update_status=""
 +
IFS=$'\n'; # Internal Field Separator: printf %q "$IFS" # default $' \t\n'
 +
for ext in $EXTENSIONS; do
 +
  if [ "${ext}" ];then
 +
    this_extension=$([ "${ext%,*}" == "$ext" ] && echo "$ext" || echo "${ext%*,* *}")
 +
    this_clone_version=$([ "${ext%,*}" == "$ext" ] && echo "$git_branch" || echo "${ext#*,* *}")
 +
    if [ ! -d "${git_mw_extension_source_dir}/${this_extension}" ]; then
 +
      echo "${git_mw_extension_source_dir}/${this_extension} DOES NOT EXIST, check the extension's name or path!! (extension was skipped)"
 +
    else
 +
      if [ ! -d "${mw_LTS_version_source_extension_path}/${this_extension}" ]; then
 +
        sudo mkdir --parents "${mw_LTS_version_source_extension_path}/${this_extension}"; this_ext_update_status="+"
 +
        sudo chown www-data:www-data "${mw_LTS_version_source_extension_path}/${this_extension}"
 +
      else
 +
        this_ext_update_status="u"
 +
      fi
 +
      printf "git archive export: %1s %-30s %s\n" $this_ext_update_status $this_extension $this_clone_version
 +
      # EXAMPLE: sudo git archive --prefix=AdminLinks/ origin/REL1_20 | sudo -u www-data tar --extract --overwrite --directory=/usr/share/mediawiki20/extensions
 +
      cd "${git_mw_extension_source_dir}/${this_extension}" && sudo git archive --prefix="${this_extension}/" $this_clone_version | sudo -u www-data tar --extract --overwrite --directory="${mw_LTS_version_source_extension_path}"
 +
      # EXAMPLE: sudo git archive --prefix=AdminLinks/ HEAD | sudo -u www-data tar --extract --overwrite --directory=/usr/share/mediawiki20/extensions
 +
      cd "${git_mw_extension_source_dir}/${this_extension}" && sudo git archive --prefix="${this_extension}/" $this_clone_version | sudo -u www-data tar --extract --overwrite --directory="${mw_LTS_version_source_extension_path}"
 +
    fi
 +
  fi
 +
done
 +
IFS=$' \t\n';
 +
</syntaxhighlight>
 +
 
 +
===Upgrading individual Wikimedia-based extensions===
 +
 
 +
The above upgrade all extensions. If an error is detected in a single extension, it is often better to upgrade only this, since updates to other extensions may introduce new errors.
 +
 
 +
: <small>Note: in many cases it is possible to delete an extension first before updating. HOWEVER SOME EXTENSIONS need special additions or configurations beyond git and will NOT WORK if deleted and checked out. Similarly, '''use the dangerous "delete-all-option" "tar --recursive-unlink" only if 100% certain that this is not the case for a given extension!'''</small>
 +
 
 +
Following are some examples from recent updates:
 +
 
 +
<syntaxhighlight lang="bash" style="margin-left:1.5em">
 +
# (1) upgade all extensions managed by git
 +
cd /usr/share/mw-wmf-clone/extensions; sudo git pull; sudo git submodule update --init --recursive;
 +
# check for tags of a specific extension
 +
# cd /usr/share/mw-wmf-clone/extensions/Maps; git tag -l | sort --version-sort
 +
 
 +
# (2) overwrite extension
 +
cd /usr/share/mw-wmf-clone/extensions/MwEmbedSupport && sudo git archive --prefix=MwEmbedSupport/ HEAD | \
 +
  sudo -u www-data tar --extract --overwrite --directory=/usr/share/mediawiki20/extensions
 +
cd /usr/share/mw-wmf-clone/extensions/Maps && sudo git archive --prefix=Maps/  tags/2.0.1 | \
 +
  sudo -u www-data tar --extract --overwrite --directory=/usr/share/mediawiki20/extensions
 +
cd /usr/share/mw-wmf-clone/extensions/ConfirmAccount && sudo git archive --prefix=ConfirmAccount/  HEAD | \
 +
  sudo -u www-data tar --extract --overwrite --directory=/usr/share/mediawiki20/extensions
 +
# OR, TO GO TO SPECIFIC RELEASE BRANCH, DO:
 +
cd /usr/share/mw-wmf-clone/extensions/ConfirmAccount && sudo git archive --prefix=ConfirmAccount/  origin/REL1_20 | \
 +
  sudo -u www-data tar --extract --overwrite --directory=/usr/share/mediawiki20/extensions
 +
cd /usr/share/mw-wmf-clone/extensions/PrefSwitch && sudo git archive --prefix=PrefSwitch/  HEAD | \
 +
  sudo -u www-data tar --extract --overwrite --directory=/usr/share/mediawiki20/extensions
 +
cd /usr/share/mw-wmf-clone/extensions/Vector && sudo git archive --prefix=Vector/  HEAD | \
 +
  sudo -u www-data tar --extract --overwrite --directory=/usr/share/mediawiki20/extensions
 +
cd /usr/share/mw-wmf-clone/extensions/SemanticDrilldown && sudo git archive  --prefix=SemanticDrilldown/  HEAD | \
 +
  sudo -u www-data tar --extract --overwrite --directory=/usr/share/mediawiki20/extensions
 +
 
 +
# DELETE manually an extension directory before extracting it using bash variables
 +
# do delete only if it is save to the extension upgrading it by deleting it first
 +
extensionName="LiquidThreads"; versionOrTag="HEAD"; directoryFrom="/usr/share/mw-wmf-clone/extensions"; directoryTo="/usr/share/mediawiki20/extensions";
 +
sudo ls ; # make sure sudo does not prompt for password on subsequent commands
 +
cd "${directoryFrom}/${extensionName}" && if [ -d "${directoryTo}" ]; then rm -r "${directoryTo}/${extensionName}/"; fi && \
 +
  sudo git archive  --prefix="${extensionName}/"  ${versionOrTag} | \
 +
  sudo -u www-data tar --extract --overwrite --directory="${directoryTo}"
 +
</syntaxhighlight>
 +
 
 +
=== Updating extensions based in local subversion repo ===
 +
<syntaxhighlight lang="bash">
 +
# 4. SVN-Extension UPDATING
 +
# If necessary: make sure www-data can update!!
 +
# cd /usr/share/mediawiki20/extensions && sudo chown -R  www-data:www-data ./.svn/
 +
# Update from LOCAL-svn with:
 +
cd ${wikipath}extensions; sudo -u www-data /usr/bin/svn update;
 +
</syntaxhighlight>
 +
 
 +
===Updating additional extensions from other sources===
 +
<syntaxhighlight lang="bash">
 +
# 5. Additional extensions from other sources
 +
### None yet.
 +
</syntaxhighlight>
 +
 
 +
=== Skins ===
 +
Since Mediawiki V1.25 the default skins are in a separate Git respository, copied separately
  
 
<source lang="bash">
 
<source lang="bash">
  # Test for unwanted local changes:
+
  # variables
  cd /usr/share/mediawikistaging/; sudo svn status phase3 extensions;
+
  git_mw_basedir="/usr/share/mediawiki25"
   
+
  git_mw_skins_source_dir="${git_mw_basedir}/skins"
# If necessary, reset any unwanted local changes:
+
  cd $git_mw_skins_source_dir
## cd /usr/share/mediawiki/; sudo svn revert -R phase3 extensions;
+
  # get default skins from separate skin git
# restore modified icons reverted above:
+
  sudo git clone https://git.wikimedia.org/git/mediawiki/skins/Vector.git
## sudo cp /usr/share/mediawikistaging/extensions/SemanticMediaWiki/skins/images/smw_button.png ./extensions/SemanticMediaWiki/skins/images/
+
  # optionally get special skins from separate git(s)
## sudo cp /usr/share/mediawikistaging/phase3/skins/common/images/poweredby_mediawiki_88x31.png ./phase3/skins/common/images/
+
  sudo git clone https://github.com/MfN-Berlin/mwSkinNaturkunde.git
+
# MAIN UPDATING:
+
  cd /usr/share/mediawiki; sudo svn update phase3 extensions  # if version then: -r100100
+
  ## MORE CAREFUL WITH EXT-TRUNK:
+
  ## cd /usr/share/mediawiki; sudo svn update ext-trunk # if version then: -r100100
+
sudo /usr/sbin/apache2ctl -k graceful && sudo service nginx restart && sudo service php5-fpm restart
+
## ext-LOCAL-svn is usually not necessary, because of automatic svn push
+
## Updating ext-tagged-release not necessary, extensions in tagged releases don't change
+
## to check whether tagged extensions have new versions, go to
+
##  http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/
+
## If a tagged extension has to be updated, follow the following pattern:
+
cd /usr/share/mediawiki/ext-tagged-release
+
sudo svn switch http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/AdminLinks/REL_0_1_5 AdminLinks
+
  sudo svn switch http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/ExternalData/REL_1_3_2 ExternalData
+
sudo svn switch http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/HeaderTabs/REL_0_8_3 HeaderTabs
+
sudo svn switch http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/Maps/REL_1_0_4 Maps
+
#### 1_0_5 is broken for nnvm.eu-maps!
+
  sudo svn switch http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/OpenID/REL_0_9 OpenID
+
sudo svn switch http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/PageObjectModel/REL_0_1_3 PageObjectModel
+
sudo svn switch http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/ReplaceText/REL_0_9_1 ReplaceText
+
sudo svn switch http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SemanticCompoundQueries/REL_0_3 SemanticCompoundQueries
+
sudo svn switch http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SemanticDrilldown/REL_1_0_1 SemanticDrilldown
+
sudo svn switch http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SemanticForms/REL_2_3_2 SemanticForms
+
sudo svn switch http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SemanticFormsInputs/REL_0_5 SemanticFormsInputs
+
sudo svn switch http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SemanticMaps/REL_1_0_4 SemanticMaps
+
#### 1_0_5 is broken for nnvm.eu-maps!
+
#OLD: sudo svn switch http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SemanticMediaWiki/REL_1_6_2 SemanticMediaWiki
+
sudo svn switch http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SemanticMediaWiki/REL_1_7_0_2 SemanticMediaWiki
+
sudo svn switch http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SemanticInternalObjects/REL_0_6_7 SemanticInternalObjects
+
#OLD: sudo svn switch http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SemanticResultFormats/REL_1_6_2 SemanticResultFormats
+
sudo svn switch http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SemanticResultFormats/REL_1_7 SemanticResultFormats
+
sudo svn switch http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SemanticSignup/REL_0_3 SemanticSignup
+
sudo svn switch http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SocialProfile/REL_1_3 SocialProfile
+
sudo svn switch http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/Validator/REL_0_4_9 Validator
+
sudo svn switch http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/Widgets/REL_0_9_2 Widgets
+
## not necessary with switch, but necessary with checkout: cd /usr/share/mediawiki/ext-tagged-release/Widgets/;
+
##  sudo chgrp www-data compiled_templates; sudo chmod g+w compiled_templates
+
sudo /usr/sbin/apache2ctl -k graceful && sudo service nginx restart && sudo service php5-fpm restart
+
 
</source>
 
</source>
 +
 +
===Additional tasks===
 +
 +
<syntaxhighlight lang="bash">
 +
# 6. Finishing touches. Widgets needs a writable folder:
 +
cd ${wikipath}
 +
sudo chown -R  www-data:www-data ./extensions/Widgets/compiled_templates;
 +
sudo chmod g+w -R  ./extensions/Widgets/compiled_templates;
 +
# eg. sudo chown -R  www-data:www-data /usr/share/mediawiki20/extensions/Widgets/compiled_templates; sudo chmod g+w -R  /usr/share/mediawiki20/extensions/Widgets/compiled_templates
 +
# Widgets does not contain all necessary code (-> Warning: require_once(/usr/share/mediawiki20/phase3/extensions/Widgets/smarty/Smarty.class.php): failed to open stream: No such file or directory...)
 +
# In the absence of installation instructions, using previously saved code:
 +
sudo cp -r /usr/share/mw-missing-code/Widgets/smarty ./extensions/Widgets
 +
sudo cp -r /usr/share/mw-missing-code/Widgets/googlecode ./extensions/Widgets
 +
<!--
 +
# NOTE: in Dec. 2012 the parts were originally copied as seen below:
 +
sudo mkdir /usr/share/mw-missing-code
 +
sudo mkdir /usr/share/mw-missing-code/Widgets
 +
sudo cp -r /usr/share/mediawikistaging/ext-tagged-release/Widgets/smarty /usr/share/mw-missing-code/Widgets
 +
sudo cp -r /usr/share/mediawikistaging/ext-tagged-release/Widgets/googlecode /usr/share/mw-missing-code/Widgets
 +
-->
 +
</syntaxhighlight>
 +
 +
=== Restart web services ===
 +
 +
sudo /usr/sbin/apache2ctl -k graceful && sudo service nginx restart && sudo service php5-fpm restart
 +
# Optionally do other updates:
 +
sudo apt-get update; sudo apt-get upgrade
 +
  
 
===Update, runJobs, rebuildFileCache, refreshMetadata scripts===
 
===Update, runJobs, rebuildFileCache, refreshMetadata scripts===
  
NOTE: Add gbif-kos!
+
NOTE: Add gbif-kos, check all wikis
  
 
Occasionally version upgrades of Mediawiki require an upgrade of the database structures. Again, the update.php must be called with symlink-compatible syntax. Examples '''for mediawiki core''' and [http://www.mediawiki.org/wiki/Extension_talk:TitleKey titlekey extension]:
 
Occasionally version upgrades of Mediawiki require an upgrade of the database structures. Again, the update.php must be called with symlink-compatible syntax. Examples '''for mediawiki core''' and [http://www.mediawiki.org/wiki/Extension_talk:TitleKey titlekey extension]:
 
<source lang="bash">
 
<source lang="bash">
  cd /var/www/metawiki;             sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
+
  cd /var/www/metawiki;         sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/studienstiftungswiki; sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/studienstiftungswiki; sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
  ### USER TABLE WARNING, 1.19 deletes field required by 1.18!!! ###
+
  cd /var/www/testwiki;          sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
  ### cd /var/www/testwiki;             sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
+
  cd /var/www/testwiki2;         sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
  cd /var/www/testwiki2;           sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
+
  cd /var/www/testwikiEDIT;     sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
  cd /var/www/v-floramalesiana/w;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
+
cd /var/www/goldengate;        sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
  cd /var/www/v-fotoflorabb/w;     sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
+
cd /var/www/dataqualitywiki;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
  cd /var/www/v-gbif-d/w;           sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
+
  cd /var/www/v-botknow-test/w;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
  cd /var/www/v-hypergarden/w;     sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
+
cd /var/www/v-binhum/w;        sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 +
cd /var/www/v-bayernflora/w;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 +
cd /var/www/v-mfn/w;          sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 +
cd /var/www/v-mfn/dig;        sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 +
cd /var/www/v-mfn/intra;      sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 +
cd /var/www/v-filteredpush/w;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 +
cd /var/www/v-floramalesiana/w;sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 +
  cd /var/www/v-fotoflorabb/w;   sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 +
  cd /var/www/v-gbif-d/w;       sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 +
  cd /var/www/v-hypergarden/w;   sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 +
cd /var/www/v-ibiosphere/w;    sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 +
cd /var/www/v-ides/w;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-ispi/w;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-ispi/w;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-k2n/w;    sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-k2n/w;    sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
Line 140: Line 401:
 
  cd /var/www/v-k2n/sl;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-k2n/sl;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-lias/w;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-lias/w;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 +
cd /var/www/v-naturgucker/r;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-nnvm/w;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-nnvm/w;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-on/w;    sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-on/w;    sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
  cd /var/www/v-orowiki/w;sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
+
cd /var/www/v-on/bfl;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 +
  cd /var/www/v-orowiki/w;       sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-phytomed/w;      sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-phytomed/w;      sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-phytopathology/w; sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-phytopathology/w; sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
Line 154: Line 417:
 
  cd /var/www/v-species/s;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-species/s;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-species/w;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-species/w;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 +
cd /var/www/v-tdwg-terms/w;    sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 +
cd /var/www/v-tdwg-groups/w;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 +
cd /var/www/v-tdwg-groups/sig; sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 +
cd /var/www/v-ukcounty/w;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-workbench/w; sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-workbench/w; sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-zsm/w;      sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-zsm/w;      sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
  
 
  # START OF TITLEKEY UPDATES:
 
  # START OF TITLEKEY UPDATES:
  cd /var/www/metawiki;             sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
+
  cd /var/www/metawiki;         sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
cd /var/www/jki/v/;              sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
+
 
  cd /var/www/studienstiftungswiki; sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/studienstiftungswiki; sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
  cd /var/www/testwiki;             sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
+
  cd /var/www/testwiki;         sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
  cd /var/www/testwiki2;           sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
+
  cd /var/www/testwiki2;         sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
  cd /var/www/v-binhum/w;           sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
+
cd /var/www/testwikiEDIT;      sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
  cd /var/www/v-filteredpush/w;     sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
+
cd /var/www/goldengate;        sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
  cd /var/www/v-floramalesiana/w;  sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
+
cd /var/www/dataqualitywiki;  sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
  cd /var/www/v-fotoflorabb/w;     sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
+
  cd /var/www/v-botknow-test/w; sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
  cd /var/www/v-gbif-d/w;           sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
+
  cd /var/www/v-binhum/w;       sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
  cd /var/www/v-gbif-terms/w;       sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
+
  cd /var/www/v-bayernflora/w;  sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
  cd /var/www/v-hypergarden/w;     sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
+
  cd /var/www/v-mfn/w;           sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
  cd /var/www/v-ibiosphere/w;     sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
+
  cd /var/www/v-mfn/dig;        sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 +
cd /var/www/v-mfn/intra;      sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 +
cd /var/www/v-filteredpush/w; sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 +
cd /var/www/v-floramalesiana/w;sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 +
cd /var/www/v-fotoflorabb/w;  sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 +
  cd /var/www/v-gbif-d/w;       sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 +
  cd /var/www/v-hypergarden/w;   sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 +
  cd /var/www/v-ibiosphere/w;   sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-ides/w;  sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-ides/w;  sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-ispi/w;  sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-ispi/w;  sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
Line 181: Line 454:
 
  cd /var/www/v-nnvm/w;  sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-nnvm/w;  sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-on/w;    sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-on/w;    sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 +
cd /var/www/v-on/bfl;  sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-orowiki/w;sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-orowiki/w;sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-phytomed/w;      sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-phytomed/w;      sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
Line 193: Line 467:
 
  cd /var/www/v-species/s;  sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-species/s;  sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-species/w;  sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 
  cd /var/www/v-species/w;  sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
  cd /var/www/v-ukcounty/w;  sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
+
  cd /var/www/v-tdwg-terms/w;   sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php --quick --conf ./LocalSettings.php
  cd /var/www/v-workbench/w; sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
+
cd /var/www/v-tdwg-groups/w;  sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
  cd /var/www/v-zsm/w;       sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
+
cd /var/www/v-tdwg-groups/sig;sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 +
cd /var/www/v-ukcounty/w;    sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 +
  cd /var/www/v-workbench/w;   sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 +
  cd /var/www/v-zsm/w;         sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
  
 
  # '''runJobs''' in all wikis //WIKI LIST NEEDS UPDATING!
 
  # '''runJobs''' in all wikis //WIKI LIST NEEDS UPDATING!
  cd /var/www/metawiki;             sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
+
  cd /var/www/metawiki;         sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/studienstiftungswiki; sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/studienstiftungswiki; sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
  cd /var/www/testwiki;             sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
+
  cd /var/www/testwiki;         sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
  cd /var/www/testwiki2;           sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
+
  cd /var/www/testwiki2;         sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
  cd /var/www/v-floramalesiana/w;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
+
  cd /var/www/testwikiEDIT;      sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
  cd /var/www/v-fotoflorabb/w;     sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
+
cd /var/www/goldengate;        sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
  cd /var/www/v-gbif-d/w;           sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
+
cd /var/www/dataqualitywiki;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
  cd /var/www/v-hypergarden/w;     sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
+
cd /var/www/v-botknow-test/w;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 +
cd /var/www/v-binhum/w;        sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 +
cd /var/www/v-bayernflora/w;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 +
cd /var/www/v-mfn/w;          sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 +
cd /var/www/v-mfn/dig;        sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 +
cd /var/www/v-mfn/intra;      sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 +
cd /var/www/v-filteredpush/w;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 +
cd /var/www/v-floramalesiana/w;sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 +
  cd /var/www/v-fotoflorabb/w;   sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 +
  cd /var/www/v-gbif-d/w;       sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 +
  cd /var/www/v-hypergarden/w;   sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 +
cd /var/www/v-ibiosphere/w;    sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 +
cd /var/www/v-ides/w;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-ispi/w;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-ispi/w;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-k2n/w;    sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-k2n/w;    sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
Line 212: Line 501:
 
  cd /var/www/v-k2n/sl;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-k2n/sl;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-lias/w;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-lias/w;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 +
cd /var/www/v-naturgucker/w; sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-nnvm/w;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-nnvm/w;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-on/w;    sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-on/w;    sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 +
cd /var/www/v-on/bfl;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-orowiki/w;sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-orowiki/w;sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
  cd /var/www/v-phytomed/w;       sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
+
  cd /var/www/v-phytomed/w;     sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
  cd /var/www/v-phytopathology/w; sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
+
  cd /var/www/v-phytopathology/w;sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
  cd /var/www/v-plantnet/terms/e; sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
+
  cd /var/www/v-plantnet/terms/e;sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
  cd /var/www/v-plantnet/terms/f; sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
+
  cd /var/www/v-plantnet/terms/f;sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
  cd /var/www/v-plantnet/uses/e; sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
+
  cd /var/www/v-plantnet/uses/e; sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
  cd /var/www/v-plantnet/uses/f; sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
+
  cd /var/www/v-plantnet/uses/f; sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-rosaceae/w;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-rosaceae/w;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-species/f;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-species/f;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
Line 226: Line 517:
 
  cd /var/www/v-species/s;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-species/s;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-species/w;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-species/w;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 +
cd /var/www/v-tdwg-terms/w;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 +
cd /var/www/v-tdwg-groups/w;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 +
cd /var/www/v-tdwg-groups/sig;sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 +
cd /var/www/v-ukcounty/w;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-workbench/w; sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-workbench/w; sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-zsm/w;      sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  cd /var/www/v-zsm/w;      sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
+
 
 
  # '''Rebuilding the file cache''' (watch permissions, simulate the www-data user as if written by apache):
 
  # '''Rebuilding the file cache''' (watch permissions, simulate the www-data user as if written by apache):
 
  cd /var/www/metawiki;            sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 
  cd /var/www/metawiki;            sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
Line 234: Line 529:
 
  cd /var/www/testwiki;            sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 
  cd /var/www/testwiki;            sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 
  cd /var/www/testwiki2;            sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 
  cd /var/www/testwiki2;            sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
  cd /var/www/v-floramalesiana/w;  sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
+
cd /var/www/testwikiEDIT;        sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
  cd /var/www/v-fotoflorabb/w;     sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
+
 
  cd /var/www/v-gbif-d/w;           sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
+
 
  cd /var/www/v-hypergarden/w;     sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
+
 
 +
 
 +
  cd /var/www/v-bayernflora/w;  sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 +
cd /var/www/v-mfn/w;          sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 +
cd /var/www/v-mfn/dig;        sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 +
cd /var/www/v-mfn/intra;      sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 +
cd /var/www/v-filteredpush/w;  sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 +
cd /var/www/v-floramalesiana/w;sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 +
  cd /var/www/v-fotoflorabb/w;   sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 +
  cd /var/www/v-gbif-d/w;       sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 +
  cd /var/www/v-hypergarden/w;   sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 
  cd /var/www/v-ispi/w;  sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 
  cd /var/www/v-ispi/w;  sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 
  cd /var/www/v-k2n/w;    sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 
  cd /var/www/v-k2n/w;    sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
Line 258: Line 563:
 
  cd /var/www/v-species/s;  sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 
  cd /var/www/v-species/s;  sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 
  cd /var/www/v-species/w;  sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 
  cd /var/www/v-species/w;  sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 +
cd /var/www/v-tdwg-terms/w;    sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 +
cd /var/www/v-tdwg-groups/w;  sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 +
cd /var/www/v-tdwg-groups/sig; sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 
  cd /var/www/v-workbench/w; sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 
  cd /var/www/v-workbench/w; sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 
  cd /var/www/v-zsm/w;      sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 
  cd /var/www/v-zsm/w;      sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 +
 
  # refreshImageMetadata.php
 
  # refreshImageMetadata.php
 
  cd /var/www/metawiki;            sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 
  cd /var/www/metawiki;            sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
Line 266: Line 575:
 
  cd /var/www/testwiki2;            sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 
  cd /var/www/testwiki2;            sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 
  cd /var/www/v-floramalesiana/w;  sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 
  cd /var/www/v-floramalesiana/w;  sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
cd /var/www/v-fotoflorabb/w;      sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 
 
  cd /var/www/v-gbif-d/w;          sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 
  cd /var/www/v-gbif-d/w;          sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
cd /var/www/v-hypergarden/w;      sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 
 
  cd /var/www/v-ispi/w;  sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 
  cd /var/www/v-ispi/w;  sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 
  cd /var/www/v-k2n/w;    sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 
  cd /var/www/v-k2n/w;    sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 
  cd /var/www/v-k2n/h;    sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 
  cd /var/www/v-k2n/h;    sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
cd /var/www/v-k2n/it;  sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 
 
  cd /var/www/v-k2n/sl;  sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 
  cd /var/www/v-k2n/sl;  sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 
  cd /var/www/v-lias/w;  sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 
  cd /var/www/v-lias/w;  sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
Line 293: Line 599:
 
</source>
 
</source>
  
: Note: do not try to update /var/www/wiki-template-staging/ and /var/www/wiki-template/, it won't work, LocalSettings is missing.
+
 
 +
: Note: do not try to update /var/www/zzz...templates.... It won't work, LocalSettings is missing.
  
 
'''For semantic mediawiki extension (SMW)''' click on "Initialise or upgrade tables" on SpecialPage Semantic Admin:
 
'''For semantic mediawiki extension (SMW)''' click on "Initialise or upgrade tables" on SpecialPage Semantic Admin:
Line 307: Line 614:
  
 
OR RUN SCRIPTS like:
 
OR RUN SCRIPTS like:
  cd /var/www/metawiki/
+
* for some maintenance scripts temporary tables are created that need <code>--dbuser=wikiadmin</code>
  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
+
<syntaxhighlight lang="bash">
 +
  cd /var/www/testwiki;
 +
  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php  
 
  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
  sudo -u www-data php ./extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php -ftpv --conf ./LocalSettings.php
+
  # rebuildData.php --help
  sudo -u www-data php ./extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php -v --conf ./LocalSettings.php
+
#  -f Fully delete all content instead of just refreshing
 +
#  -t refresh only type pages
 +
#  -c refresh only category pages
 +
#  -p refresh only property pages
 +
#  -v be verbose about the progress
 +
# rebuild all data completely from scratch
 +
# sudo -u www-data php ./extensions/SemanticMediaWiki/maintenance/rebuildData.php --dbuser=wikiadmin -fv --conf=./LocalSettings.php  
 +
# just update all relevant data
 +
  sudo -u www-data php ./extensions/SemanticMediaWiki/maintenance/rebuildData.php --dbuser=wikiadmin -v --conf=./LocalSettings.php  
 
  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
+
sudo /usr/sbin/apache2ctl -k graceful && sudo service nginx restart && sudo service php5-fpm restart
 +
</syntaxhighlight>
  
 
See also [[#Maintenance scripts| Maintenance scripts]] above for further scripts.
 
See also [[#Maintenance scripts| Maintenance scripts]] above for further scripts.
  
===Switching targets of symbolic links===
+
=== Upgrade-Checklist of issues and task ===
Old symbolic links can be deleted interactively by prompting on each remove and set anew as follows (example extension SemanticResultFormats):
+
When upgrading to a new wiki core check the following issues
<source lang="bash">
+
==== Cron jobs ====
cd /usr/share/mediawiki/phase3/extensions
+
* valid path? e.g. /extensions/CommonsMediaCaching/runJobs.sh. See /etc/cron…
sudo rm -i SemanticResultFormats;  sudo ln -s ../../extensions2/SemanticResultFormats
+
sudo /usr/sbin/apache2ctl -k graceful && sudo service nginx restart && sudo service php5-fpm restart
+
</source>
+
  
To document those links, a small bash script create_sorted_extension_list.sh located in both extension folders creates a dated log file sorted by links (the script asks before start logging). It can be started by something like that:
+
==Cache and Media folders==
<source lang="bash">
+
  ./create_sorted_extension_list.sh
+
    Create sorted extension list (y/n)
+
</source>
+
  
=== Adding a new directory link ===
+
Cache is the file cache, to reduce server load when used by not-logged-in users.
  
Occasionally new directories directly in /phase3/ are introduced by mediawiki.org with version upgrades. New symbolic links need to be created:
+
===Cleaning corrupt Cache===
<source lang="bash">
+
# root wiki from staging:
+
cd /var/www/testwiki/; sudo ln -s /usr/share/mediawikistaging/phase3/resources/ resources
+
cd /var/www/wiki-template-staging/; sudo ln -s /usr/share/mediawikistaging/phase3/resources/ resources
+
# root wikis from normal:
+
cd /var/www/metawiki/; sudo ln -s /usr/share/mediawiki/phase3/resources/ resources
+
cd /var/www/studienstiftungswiki/; sudo ln -s /usr/share/mediawiki/phase3/resources/ resources
+
cd /var/www/wiki-template/; sudo ln -s /usr/share/mediawiki/phase3/resources/ resources
+
# virtual servers
+
cd /var/www/v-ispi/w/; sudo ln -s /usr/share/mediawiki/phase3/resources/ resources
+
cd /var/www/v-k2n/w/;  sudo ln -s /usr/share/mediawiki/phase3/resources/ resources
+
cd /var/www/v-k2n/h/;  sudo ln -s /usr/share/mediawiki/phase3/resources/ resources
+
cd /var/www/v-k2n/it/; sudo ln -s /usr/share/mediawiki/phase3/resources/ resources
+
cd /var/www/v-k2n/sl/; sudo ln -s /usr/share/mediawiki/phase3/resources/ resources
+
cd /var/www/v-lias/w/; sudo ln -s /usr/share/mediawiki/phase3/resources/ resources
+
cd /var/www/v-on/w/;  sudo ln -s /usr/share/mediawiki/phase3/resources/ resources
+
cd /var/www/v-phytomed/w/;      sudo ln -s /usr/share/mediawiki/phase3/resources/ resources
+
cd /var/www/v-phytopathology/w; sudo ln -s /usr/share/mediawiki/phase3/resources/ resources
+
cd /var/www/v-plantnet/terms/e; sudo ln -s /usr/share/mediawiki/phase3/resources/ resources
+
cd /var/www/v-plantnet/terms/f; sudo ln -s /usr/share/mediawiki/phase3/resources/ resources
+
cd /var/www/v-plantnet/uses/e;  sudo ln -s /usr/share/mediawiki/phase3/resources/ resources
+
cd /var/www/v-plantnet/uses/f;  sudo ln -s /usr/share/mediawiki/phase3/resources/ resources
+
cd /var/www/v-rosaceae/w; sudo ln -s /usr/share/mediawiki/phase3/resources/ resources
+
cd /var/www/v-species/f/; sudo ln -s /usr/share/mediawiki/phase3/resources/ resources
+
cd /var/www/v-species/o/; sudo ln -s /usr/share/mediawiki/phase3/resources/ resources
+
cd /var/www/v-species/s/; sudo ln -s /usr/share/mediawiki/phase3/resources/ resources
+
cd /var/www/v-species/w/; sudo ln -s /usr/share/mediawiki/phase3/resources/ resources
+
cd /var/www/v-workbench/w/; sudo ln -s /usr/share/mediawiki/phase3/resources/ resources
+
</source>
+
  
(To remove links one may use the interactive option <code>rm -i</code>, but one must confirm each single file.)
+
for f in /mnt/dump/var/www/*cache/*/*/*.html; do sudo rm "$f"; done
 +
for f in /mnt/dump/var/www/*cache/*.cdb; do sudo rm "$f"; done
 +
for f in /mnt/dump/var/www/*cache/*; do sudo rm "$f" -r; done
 +
sudo /usr/sbin/apache2ctl -k graceful && sudo service nginx restart && sudo service php5-fpm restart
  
  
===Moving Cache and Media folders ===
+
===Moving Cache and Media folders to different partition ===
  
 
Only limited space exists on the root partition itself. Larger Wiki have their Media and Cache folders relocated to the the /mnt/storage and /mnt/dump partitions, respectively. The cache of the following Wikis is presently in /mnt/dump/var/www/: testwiki-cache; v-ispi-w-cache; v-k2n-w-cache; v-lias-w-cache; v-nnvm-w-cache; v-on-w-cache; v-orowiki-w-cache; v-species-o-cache; v-species-w-cache. Move like:
 
Only limited space exists on the root partition itself. Larger Wiki have their Media and Cache folders relocated to the the /mnt/storage and /mnt/dump partitions, respectively. The cache of the following Wikis is presently in /mnt/dump/var/www/: testwiki-cache; v-ispi-w-cache; v-k2n-w-cache; v-lias-w-cache; v-nnvm-w-cache; v-on-w-cache; v-orowiki-w-cache; v-species-o-cache; v-species-w-cache. Move like:
 
+
<syntaxhighlight lang="bash">
# create folders on dump, then change owner and group:
+
### manual version
 +
# create folders on dump, then change owner and group:
 
  cd /mnt/dump/var/www; sudo mkdir v-lias-w-cache; sudo chown www-data *; sudo chgrp www-data *;
 
  cd /mnt/dump/var/www; sudo mkdir v-lias-w-cache; sudo chown www-data *; sudo chgrp www-data *;
# remove current cache, create link to new folder:
+
# remove current cache, create link to new folder:
 
  cd /var/www/v-lias/w;    sudo rm cache -r; sudo ln -s /mnt/dump/var/www/v-lias-w-cache  cache
 
  cd /var/www/v-lias/w;    sudo rm cache -r; sudo ln -s /mnt/dump/var/www/v-lias-w-cache  cache
 +
 +
### script version
 +
# create folders on dump, then change owner and group:
 +
var_dump_path="/mnt/dump/var/www";
 +
var_dump_folder="v-lias-w-cache";
 +
web_wiki_base_path="/var/www/v-lias/w",
 +
sudo mkdir --parent "${var_dump_path}/${var_dump_folder}";
 +
sudo chown www-data "${var_dump_path}/${var_dump_folder}";
 +
sudo chgrp www-data "${var_dump_path}/${var_dump_folder}";
 +
# remove current cache, create link to new folder:
 +
sudo rm "${web_wiki_base_path}/cache" -r;
 +
# make a symlink
 +
cd "${web_wiki_base_path}" && sudo ln -s "${var_dump_path}/${var_dump_folder}" "cache"
 +
</syntaxhighlight>
  
 
For linking media folder (to Storage, not Dump!):
 
For linking media folder (to Storage, not Dump!):
Line 415: Line 715:
 
Note, that the logfile will grow fast, so one should switch on the logging only for short periods of time, and delete the logfile after done.
 
Note, that the logfile will grow fast, so one should switch on the logging only for short periods of time, and delete the logfile after done.
  
PHP debugging can be doen with [http://www.xdebug.org xdebug]. Details see [[Mediawiki debugging]].
+
PHP debugging can be done with [http://www.xdebug.org xdebug]. Details see [[Mediawiki debugging]].
 +
 
 +
=== Apply a Patch Manually to a File (LTS Version) ===
 +
 
 +
Some branches of a MediaWiki Long Term Support (LTS) version seem not to be “back”-integrated in an older branch, e.g. origin/REL1_23. So one has to apply bug-fixes manually by applying a patch to a file for a LTS version:
 +
# download and extract the file reported as being fixed (example: [https://gerrit.wikimedia.org/r/#/c/28795/1/includes/api/ApiQueryImageInfo.php ApiQueryImageInfo.php])
 +
# move it to the folder of the LTS version
 +
# check differences, create a patch
 +
# apply the patch
 +
 
 +
(TODO: There is possibly also a way to integrate a git pull to a specific branch)
 +
<syntaxhighlight lang="bash">
 +
# set variables
 +
mw_LTS_version_source_path="/usr/share/mediawiki20"
 +
mw_LTS_version_source_extension_path="${mw_LTS_version_source_path}/extensions"
 +
# go to the source folder to apply the patch
 +
cd "${mw_LTS_version_source_path}/includes/api"
 +
# have the downloaded and extracted file already in place
 +
# use wget and tar -x
 +
### check differences ##
 +
# vimdiff ApiQueryImageInfo.php ApiQueryImageInfo_new-64d8aeda6305b64974731c4408b85e92225f1752.php
 +
#  move left-down-top-right by h←, j↓, k↑, l→
 +
#  quit and type ":q" to quit split vimdiff window one by one (i.e. twice ":q")
 +
### create patch ###
 +
# diff --unified oldfile newfile > file.diffpatch
 +
sudo diff --unified  ApiQueryImageInfo.php ApiQueryImageInfo_new-64d8aeda6305b64974731c4408b85e92225f1752.php > 'ApiQueryImageInfo_Internal_error_in_ApiResult::setElement:Bad_parameter.diffpatch'
 +
# apply the patch
 +
sudo patch < "ApiQueryImageInfo_Internal_error_in_ApiResult::setElement:Bad_parameter.diffpatch"
 +
# reverse the patch
 +
# sudo patch --reverse < "ApiQueryImageInfo_Internal_error_in_ApiResult::setElement:Bad_parameter.diffpatch"
 +
</syntaxhighlight>
  
 
==Backup/Restore in general==
 
==Backup/Restore in general==
Line 452: Line 782:
 
  cd /var/www/WIKINAME;  # (replace path with actual wiki path!)
 
  cd /var/www/WIKINAME;  # (replace path with actual wiki path!)
 
  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
  sudo -u www-data php ./extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php -ftpv --conf ./LocalSettings.php
+
  # rebuildData.php
  sudo -u www-data php ./extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php -v --conf ./LocalSettings.php
+
# -f Fully delete all content instead of just refreshing
 +
# -t refresh only type pages
 +
# -c refresh only category pages
 +
# -p refresh only property pages
 +
# -v be verbose about the progress
 +
### rebuild data completely from scratch
 +
# sudo -u www-data php ./extensions/SemanticMediaWiki/maintenance/rebuildData.php --dbuser=wikiadmin -fv --conf=./LocalSettings.php
 +
# # may work only with equal sign = in --conf=./LocalSettings.php
 +
 
 +
### just update relevant data (a category) or all data
 +
# # may work only with equal sign = in --conf=./LocalSettings.php
 +
  sudo -u www-data php ./extensions/SemanticMediaWiki/maintenance/rebuildData.php --dbuser=wikiadmin --query='[[Category:ThisandThat]]' --conf=./LocalSettings.php
 +
 
 +
sudo -u www-data php ./extensions/SemanticMediaWiki/maintenance/rebuildData.php --dbuser=wikiadmin -v --conf=./LocalSettings.php  
 +
 
 
  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 
</source>
 
</source>
Line 467: Line 811:
 
# interrupting the procedure by using Crtl-C
 
# interrupting the procedure by using Crtl-C
 
# restarting the last command by specifying the next ID to be processed, e.g.
 
# restarting the last command by specifying the next ID to be processed, e.g.
  php ./extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php -v -s 2062 --conf ./LocalSettings.php
+
  php ./extensions/SemanticMediaWiki/maintenance/rebuildData.php -v -s 2062 --conf ./LocalSettings.php # may work only with --conf=./LocalSettings.php
 
if 2061 IDs had been already processed at the time of the interruption.
 
if 2061 IDs had been already processed at the time of the interruption.
  
Line 474: Line 818:
  
 
See also: '''[[Mediawiki installation]]'''
 
See also: '''[[Mediawiki installation]]'''
[[Category:Software documentation]]
+
[[Category:Semantic Mediawiki]]
[[Category:Extensions]]
+
[[Category:Maintenance]]
 +
[[Category: MediaWiki Extensions]]
 +
[[Category:Upgrade]]
 +
[[Category:MediaWiki]]

Latest revision as of 15:38, 16 April 2019

(See also Mediawiki on biowikifarm (quick introduction/overview of setup) and the Mediawiki installation page (first time installation details).)

NOTE: the instructions below are fully valid for the 1.18/SVN setup. Some steps may differ in the current 1.20/git setup!

Mediawiki maintenance scripts

(See http://www.mediawiki.org/wiki/Manual:Maintenance_scripts)

In /usr/share/mediawiki/phase3/ copy AdminSettings.sample to AdminSettings.php, create a new user wikiadmin for mysql with localhost only, and edit AdminSettings.php accordingly. Then, for each wiki, in /var/www/wikifolder/, a symlink must be created linking to /usr/share/mediawiki/phase3/AdminSettings.php. Since we have a symlinked installation, installations scripts must run like:

 php /var/www/wikifolder/maintenance/rebuildall.php   --conf /var/www/wikifolder/LocalSettings.php
 php /var/www/wikifolder/maintenance/importImages.php --conf /var/www/wikifolder/LocalSettings.php /var/www/wikifolder/media/newimages .jpg .png .svg

Rebuild all is necessary after external text, sql, or xml imports.

Table corruption: rebuildall.php may report that a table, especially searchindex (which is MyISAM even if other tables are InnoDB) is corrupt and needs to be repaired. In phpmyadmin (http://biowikifarm.net/phpmyadmin_v3-3-7), open a sql window for the affected database, and issue: truncate table searchindex;. Running rebuildall.php afterwards concluded the repair in a case we had.

After erroneously localizing commons images not to openmedia but to local wikis, extension Nuke was used to deleted the caching-bot imports, and deleteArchivedFiles to actually delete all archived files, e.g.:

 cd /var/www/v-on/w; php ./maintenance/deleteArchivedFiles.php  --conf ./LocalSettings.php --delete

Fix problems with unparsable image names (see [1]). Needs NOT be run on regular basis, usually no problems:

 cd /var/www/v-k2n/w; php ./maintenance/cleanupImages.php --fix  --conf ./LocalSettings.php
 cd /var/www/v-on/w; php ./maintenance/cleanupImages.php --fix  --conf ./LocalSettings.php
 cd /var/www/v-species/w; php ./maintenance/cleanupImages.php --fix  --conf ./LocalSettings.php
 cd /var/www/v-species/o; php ./maintenance/cleanupImages.php --fix  --conf ./LocalSettings.php
 cd /var/www/v-species/s; php ./maintenance/cleanupImages.php --fix  --conf ./LocalSettings.php

Extension maintenance scripts

Some extensions provide their own maintenance scripts in their own extension folder. On a wiki farm, the execution of these scripts may fail due to the linked directory structure. They need an additional link (needs to be created only once):

 cd /usr/share/mediawiki/; ln -s /usr/share/mediawikistaging/phase3/maintenance
 cd /usr/share/mediawikistaging/; ln -s /usr/share/mediawikistaging/phase3/maintenance

TitleKey now installed (here only example, full set of update commands available further down!):

 cd /var/www/testwiki; php ./extensions/TitleKey/rebuildTitleKeys.php --conf ./LocalSettings.php

MediaWiki version upgrading

Core and wikimedia-base extensions

# 1. Update the git clone on biowikifarm:
cd /usr/share/mw-wmf-clone/core; sudo git fetch; 
cd ../extensions; sudo git pull; sudo git submodule update --init --recursive;
cd ../skins; sudo git pull; sudo git submodule update --init --recursive;

Core and extensions are exported by a tar archive export out of a git clone. This works for creating the first version as well as updating. (Suggestion: before starting the script do a sudo command, e.g. sudo ls so the bash prompt knows your password and you don't have to give your password over and over again). DO NOT RUN THIS SCRIPT ENTIRELY and be fully AWARE OF WHAT YOU EXACTLY DO.

How the structure is intended:

 mw-wmf-clone
 ├ core (Git) ─────────git-archive-export───┐
 └ extensions (Git) ───git-archive-export─→ ) ─┐
                                            │  │
   wiki-source-LTS (e.g. REL1_23)           │  │
   ┌ core-files (local git archive-export) ←┘  │
   ├ extensions (mixed:                        │
   │   svn biowikifarm, (repo: as svn-post-commit)
   │   git-archive-export)  ←──────────────────┘
   │ 
   ↓   
   │ web-wiki (as LTS web Wiki)
   ├─→ core-files (linked)
   └─→ extensions (linked)
# variables
  git_mw_basedir="/usr/share/mw-wmf-clone"
  git_mw_core_source_dir="${git_mw_basedir}/core"
  git_mw_extension_source_dir="${git_mw_basedir}/extensions"
  git_tag_wikiversion="1.20.7"
  git_branch="origin/REL1_20" # if nothin gis specified this will be the default to extract
  mw_LTS_version_source_path="/usr/share/mediawiki20"
# 1. Update biowikifarm clone:
  # UPGRADE step may not be necessary: upgrade changes from remote git source: fetch & merge
  cd "${git_mw_core_source_dir}"; 
    sudo git pull;
    git branch -r | sort --version-sort # list branches
    git tag -l | sort --version-sort # list tags
  cd "${git_mw_extension_source_dir}";
    sudo git pull; sudo git submodule update --init --recursive;
    git branch -r | sort --version-sort # list branches
    git tag -l | sort --version-sort # list tags

# 2. Export (git archive) a specific MediaWiki versions into other folders:
 # First Update Core only, create path if not yet present:
 if ! [ -d "${mw_LTS_version_source_path}" ]; then sudo mkdir "${mw_LTS_version_source_path}"; fi
 # note that git archive does not extract mw-config directory for install (?gitignored something?)
 cd "${git_mw_core_source_dir}"; sudo git archive $git_tag_wikiversion | sudo tar --extract --overwrite --directory="${mw_LTS_version_source_path}"
  # Note: tar provides a "--recursive-unlink" option for extract, which removes the content of the target folder
  #  However, our mediawiki installations require many additional files (svn, widget-right changes, smarty, commons-bot)
  #  which would have to be manually restored. Therefore, DO NOT use --recursive-unlink !

 # 3. Export (git archive) the extensions:
 # In list of extensions desired version is specified like the following examples:
 #  "SemanticMediaWiki"           → version HEAD + extension SemanticMediaWiki
 #  "SemanticMediaWiki, 1.8" → version  1.8 + extension SemanticMediaWiki
 ## NOTE: DO NOT use SemanticCalendar - this is obsolete!!!
 EXTENSIONS="AccessControl
AdminLinks
APC
Arrays
ArticleFeedback
ArticleFeedbackv5
AssertEdit
CategoryTree
CentralAuth
CentralNotice
CharInsert
CheckUser
Cite
cldr
ClickTracking
CodeEditor
Collection
ConditionalShowSection
Configure
ConfirmAccount
ConfirmEdit
ContactPage
Contest
ContributionReporting
DataTransfer
DiscussionThreading
DismissableSiteNotice
DoubleWiki
DumpHTML
DynamicPageList
EmailCapture
ExpandTemplates
ExternalData
FlaggedRevs
FormPreloadPostCache
Gadgets
GlobalBlocking
GlobalUsage
GlobalUserGroups
GraphViz
HeaderTabs
ImageMap
InputBox
Interlanguage
intersection
Interwiki
LabeledSectionTransclusion
LiquidThreads
Lockdown
Loops
Maintenance
Maps, 2.0.1
Math
MediaFunctions
MobileFrontend
MoodBar
MwEmbedSupport
MWSearch
Nuke
OAI
OggHandler
OpenID
OpenSearchXml
PagedTiffHandler
ParserFunctions
PdfHandler
Persona
Poem
PrefSwitch
ProofreadPage
Quiz
Renameuser
ReplaceText
RSS
Scribunto
SemanticCompoundQueries, 0.3.4
SemanticDrilldown, 1.2.4
SemanticForms, 2.5.1
SemanticFormsInputs
SemanticImageInput
SemanticInternalObjects, 0.7
SemanticMaps, 2.0
SemanticMediaWiki, 1.8
SemanticResultFormats, 1.8
SemanticSignup
SemanticWatchlist
SimpleSurvey
SocialProfile
SpamBlacklist
Sudo
Suhosin
SwiftCloudFiles
SyntaxHighlight_GeSHi
TimedMediaHandler
TitleKey
UploadLocal
UploadWizard
Validator, 0.5.1
Variables
Vector
VipsScaler
VisualEditor
WebFonts
Widgets
WikiEditor
WikiLove
WikimediaMessages
Wikibase
WikibaseLib
WikibaseSolr
WikibaseQuery
WikibaseDataModel
WikibaseDatabase
WikibaseQueryEngine
Diff
Ask
DataValues
DataTypes
Serialization
Push
DeleteBatch"
## Note: as of 2013-10, the extensions ValueParsers ValueFormatters ValueValidators 
##   mentioned in Wikibase install do not exist. Not checked any further -gh

  # --------------------------------------
  # split line on ", ". If only one value, export HEAD, else first value is branch/tag. Example:
  #   "SemanticMediaWiki, 1.8"
  #      ↓                 ↓
  #   $this_extension  $this_clone_version
  #   will export tag 1.8  otherwise $git_branch
  # --------------------------------------
  # NOTE: check the line (similar to ternary operator: if condition ? dothis : dootherthings)
  # $( … ) substitutes/returns the command's output
  # → if ext-check-with-comma == ext then (&&) "HEAD or $git_branch" else (||) version-string
  # ${ext%,*}    from back  of $ext → delete shortest (%) or (%%) longest match 
  # ${ext#*,* }  from front of $ext → delete shortest (#) or (##) longest match
  # --------------------------------------
mw_LTS_version_source_extension_path="${mw_LTS_version_source_path}/extensions"
this_ext_update_status=""
IFS=$'\n'; # Internal Field Separator: printf %q "$IFS" # default $' \t\n'
for ext in $EXTENSIONS; do
  if [ "${ext}" ];then
    this_extension=$([ "${ext%,*}" == "$ext" ] && echo "$ext" || echo "${ext%*,* *}")
    this_clone_version=$([ "${ext%,*}" == "$ext" ] && echo "$git_branch" || echo "${ext#*,* *}")
    if [ ! -d "${git_mw_extension_source_dir}/${this_extension}" ]; then
      echo "${git_mw_extension_source_dir}/${this_extension} DOES NOT EXIST, check the extension's name or path!! (extension was skipped)"
    else
      if [ ! -d "${mw_LTS_version_source_extension_path}/${this_extension}" ]; then
        sudo mkdir --parents "${mw_LTS_version_source_extension_path}/${this_extension}"; this_ext_update_status="+"
        sudo chown www-data:www-data "${mw_LTS_version_source_extension_path}/${this_extension}"
      else
        this_ext_update_status="u"
      fi
      printf "git archive export: %1s %-30s %s\n" $this_ext_update_status $this_extension $this_clone_version
      # EXAMPLE: sudo git archive --prefix=AdminLinks/ origin/REL1_20 | sudo -u www-data tar --extract --overwrite --directory=/usr/share/mediawiki20/extensions
      cd "${git_mw_extension_source_dir}/${this_extension}" && sudo git archive --prefix="${this_extension}/" $this_clone_version | sudo -u www-data tar --extract --overwrite --directory="${mw_LTS_version_source_extension_path}"
      # EXAMPLE: sudo git archive --prefix=AdminLinks/ HEAD | sudo -u www-data tar --extract --overwrite --directory=/usr/share/mediawiki20/extensions
      cd "${git_mw_extension_source_dir}/${this_extension}" && sudo git archive --prefix="${this_extension}/" $this_clone_version | sudo -u www-data tar --extract --overwrite --directory="${mw_LTS_version_source_extension_path}"
    fi
  fi
done
IFS=$' \t\n';

Upgrading individual Wikimedia-based extensions

The above upgrade all extensions. If an error is detected in a single extension, it is often better to upgrade only this, since updates to other extensions may introduce new errors.

Note: in many cases it is possible to delete an extension first before updating. HOWEVER SOME EXTENSIONS need special additions or configurations beyond git and will NOT WORK if deleted and checked out. Similarly, use the dangerous "delete-all-option" "tar --recursive-unlink" only if 100% certain that this is not the case for a given extension!

Following are some examples from recent updates:

# (1) upgade all extensions managed by git
cd /usr/share/mw-wmf-clone/extensions; sudo git pull; sudo git submodule update --init --recursive;
# check for tags of a specific extension
# cd /usr/share/mw-wmf-clone/extensions/Maps; git tag -l | sort --version-sort

# (2) overwrite extension
cd /usr/share/mw-wmf-clone/extensions/MwEmbedSupport && sudo git archive --prefix=MwEmbedSupport/ HEAD | \
  sudo -u www-data tar --extract --overwrite --directory=/usr/share/mediawiki20/extensions
cd /usr/share/mw-wmf-clone/extensions/Maps && sudo git archive --prefix=Maps/   tags/2.0.1 | \
  sudo -u www-data tar --extract --overwrite --directory=/usr/share/mediawiki20/extensions
cd /usr/share/mw-wmf-clone/extensions/ConfirmAccount && sudo git archive --prefix=ConfirmAccount/   HEAD | \
  sudo -u www-data tar --extract --overwrite --directory=/usr/share/mediawiki20/extensions
# OR, TO GO TO SPECIFIC RELEASE BRANCH, DO:
cd /usr/share/mw-wmf-clone/extensions/ConfirmAccount && sudo git archive --prefix=ConfirmAccount/   origin/REL1_20 | \
  sudo -u www-data tar --extract --overwrite --directory=/usr/share/mediawiki20/extensions
cd /usr/share/mw-wmf-clone/extensions/PrefSwitch && sudo git archive --prefix=PrefSwitch/   HEAD | \
  sudo -u www-data tar --extract --overwrite --directory=/usr/share/mediawiki20/extensions
cd /usr/share/mw-wmf-clone/extensions/Vector && sudo git archive --prefix=Vector/   HEAD | \
  sudo -u www-data tar --extract --overwrite --directory=/usr/share/mediawiki20/extensions
cd /usr/share/mw-wmf-clone/extensions/SemanticDrilldown && sudo git archive  --prefix=SemanticDrilldown/  HEAD | \
  sudo -u www-data tar --extract --overwrite --directory=/usr/share/mediawiki20/extensions

# DELETE manually an extension directory before extracting it using bash variables
# do delete only if it is save to the extension upgrading it by deleting it first
extensionName="LiquidThreads"; versionOrTag="HEAD"; directoryFrom="/usr/share/mw-wmf-clone/extensions"; directoryTo="/usr/share/mediawiki20/extensions";
sudo ls ; # make sure sudo does not prompt for password on subsequent commands
cd "${directoryFrom}/${extensionName}" && if [ -d "${directoryTo}" ]; then rm -r "${directoryTo}/${extensionName}/"; fi && \
  sudo git archive  --prefix="${extensionName}/"  ${versionOrTag} | \
  sudo -u www-data tar --extract --overwrite --directory="${directoryTo}"

Updating extensions based in local subversion repo

 # 4. SVN-Extension UPDATING
 # If necessary: make sure www-data can update!!
 # cd /usr/share/mediawiki20/extensions && sudo chown -R  www-data:www-data ./.svn/
 # Update from LOCAL-svn with:
 cd ${wikipath}extensions; sudo -u www-data /usr/bin/svn update;

Updating additional extensions from other sources

 # 5. Additional extensions from other sources
 ### None yet.

Skins

Since Mediawiki V1.25 the default skins are in a separate Git respository, copied separately

 # variables
 git_mw_basedir="/usr/share/mediawiki25"
 git_mw_skins_source_dir="${git_mw_basedir}/skins"
 cd $git_mw_skins_source_dir
 # get default skins from separate skin git
 sudo git clone https://git.wikimedia.org/git/mediawiki/skins/Vector.git
 # optionally get special skins from separate git(s)
 sudo git clone https://github.com/MfN-Berlin/mwSkinNaturkunde.git

Additional tasks

 # 6. Finishing touches. Widgets needs a writable folder:
 cd ${wikipath}
 sudo chown -R  www-data:www-data ./extensions/Widgets/compiled_templates;
 sudo chmod g+w -R  ./extensions/Widgets/compiled_templates;
 # eg. sudo chown -R  www-data:www-data /usr/share/mediawiki20/extensions/Widgets/compiled_templates; sudo chmod g+w -R  /usr/share/mediawiki20/extensions/Widgets/compiled_templates
 # Widgets does not contain all necessary code (-> Warning: require_once(/usr/share/mediawiki20/phase3/extensions/Widgets/smarty/Smarty.class.php): failed to open stream: No such file or directory...)
 # In the absence of installation instructions, using previously saved code:
 sudo cp -r /usr/share/mw-missing-code/Widgets/smarty ./extensions/Widgets
 sudo cp -r /usr/share/mw-missing-code/Widgets/googlecode ./extensions/Widgets
<!--
 # NOTE: in Dec. 2012 the parts were originally copied as seen below:
 sudo mkdir /usr/share/mw-missing-code
 sudo mkdir /usr/share/mw-missing-code/Widgets
 sudo cp -r /usr/share/mediawikistaging/ext-tagged-release/Widgets/smarty /usr/share/mw-missing-code/Widgets
 sudo cp -r /usr/share/mediawikistaging/ext-tagged-release/Widgets/googlecode /usr/share/mw-missing-code/Widgets
-->

Restart web services

sudo /usr/sbin/apache2ctl -k graceful && sudo service nginx restart && sudo service php5-fpm restart
# Optionally do other updates:
sudo apt-get update; sudo apt-get upgrade 


Update, runJobs, rebuildFileCache, refreshMetadata scripts

NOTE: Add gbif-kos, check all wikis

Occasionally version upgrades of Mediawiki require an upgrade of the database structures. Again, the update.php must be called with symlink-compatible syntax. Examples for mediawiki core and titlekey extension:

 cd /var/www/metawiki;          sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/studienstiftungswiki; sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/testwiki;          sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/testwiki2;         sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/testwikiEDIT;      sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/goldengate;        sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/dataqualitywiki;   sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-botknow-test/w;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-binhum/w;        sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-bayernflora/w;   sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-mfn/w;           sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-mfn/dig;         sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-mfn/intra;       sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-filteredpush/w;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-floramalesiana/w;sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-fotoflorabb/w;   sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-gbif-d/w;        sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-hypergarden/w;   sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-ibiosphere/w;    sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-ides/w;   sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-ispi/w;   sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-k2n/w;    sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-k2n/h;    sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-k2n/it;   sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-k2n/sl;   sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-lias/w;   sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-naturgucker/r;   sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-nnvm/w;   sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-on/w;     sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-on/bfl;   sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-orowiki/w;        sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-phytomed/w;       sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-phytopathology/w; sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-plantnet/terms/e; sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-plantnet/terms/f; sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-plantnet/uses/e;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-plantnet/uses/f;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-rosaceae/w;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-species/f;   sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-species/o;   sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-species/s;   sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-species/w;   sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-tdwg-terms/w;    sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-tdwg-groups/w;   sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-tdwg-groups/sig; sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-ukcounty/w;  sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-workbench/w; sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-zsm/w;       sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php

 # START OF TITLEKEY UPDATES:
 cd /var/www/metawiki;          sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/studienstiftungswiki; sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/testwiki;          sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/testwiki2;         sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/testwikiEDIT;      sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/goldengate;        sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/dataqualitywiki;   sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-botknow-test/w;  sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-binhum/w;        sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-bayernflora/w;   sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-mfn/w;           sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-mfn/dig;         sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-mfn/intra;       sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-filteredpush/w;  sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-floramalesiana/w;sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-fotoflorabb/w;   sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-gbif-d/w;        sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-hypergarden/w;   sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-ibiosphere/w;    sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-ides/w;   sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-ispi/w;   sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-k2n/h;    sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-k2n/it;   sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-k2n/sl;   sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-k2n/w;    sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-lias/w;   sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-naturgucker/r; sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-nnvm/w;   sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-on/w;     sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-on/bfl;   sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-orowiki/w;sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-phytomed/w;       sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-phytopathology/w; sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-plantnet/terms/e; sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-plantnet/terms/f; sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-plantnet/uses/e;  sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-plantnet/uses/f;  sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-rosaceae/w;  sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-species/f;   sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-species/o;   sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-species/s;   sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-species/w;   sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-tdwg-terms/w;   sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-tdwg-groups/w;  sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-tdwg-groups/sig;sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-ukcounty/w;     sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-workbench/w;    sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php
 cd /var/www/v-zsm/w;          sudo -u www-data php ./extensions/TitleKey/rebuildTitleKeys.php  --quick --conf ./LocalSettings.php

 # '''runJobs''' in all wikis //WIKI LIST NEEDS UPDATING!
 cd /var/www/metawiki;          sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/studienstiftungswiki; sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/testwiki;          sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/testwiki2;         sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/testwikiEDIT;      sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/goldengate;        sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/dataqualitywiki;   sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-botknow-test/w;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-binhum/w;        sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-bayernflora/w;   sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-mfn/w;           sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-mfn/dig;         sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-mfn/intra;       sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-filteredpush/w;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-floramalesiana/w;sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-fotoflorabb/w;   sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-gbif-d/w;        sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-hypergarden/w;   sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-ibiosphere/w;    sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-ides/w;   sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-ispi/w;   sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-k2n/w;    sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-k2n/h;    sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-k2n/it;   sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-k2n/sl;   sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-lias/w;   sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-naturgucker/w; sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-nnvm/w;   sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-on/w;     sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-on/bfl;   sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-orowiki/w;sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-phytomed/w;      sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-phytopathology/w;sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-plantnet/terms/e;sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-plantnet/terms/f;sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-plantnet/uses/e; sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-plantnet/uses/f; sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-rosaceae/w;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-species/f;   sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-species/o;   sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-species/s;   sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-species/w;   sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-tdwg-terms/w;   sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-tdwg-groups/w;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-tdwg-groups/sig;sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-ukcounty/w;  sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-workbench/w; sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 cd /var/www/v-zsm/w;       sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php

 # '''Rebuilding the file cache''' (watch permissions, simulate the www-data user as if written by apache):
 cd /var/www/metawiki;             sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/studienstiftungswiki; sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/testwiki;             sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/testwiki2;            sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/testwikiEDIT;         sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php




 cd /var/www/v-bayernflora/w;   sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-mfn/w;           sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-mfn/dig;         sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-mfn/intra;       sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-filteredpush/w;  sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-floramalesiana/w;sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-fotoflorabb/w;   sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-gbif-d/w;        sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-hypergarden/w;   sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-ispi/w;   sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-k2n/w;    sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-k2n/h;    sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-k2n/it;   sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-k2n/sl;   sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-lias/w;   sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-nnvm/w;   sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-on/w;     sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-orowiki/w;sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-phytomed/w;       sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-phytopathology/w; sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-plantnet/terms/e; sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-plantnet/terms/f; sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-plantnet/uses/e;  sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-plantnet/uses/f;  sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-rosaceae/w;  sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-species/f;   sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-species/o;   sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-species/s;   sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-species/w;   sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-tdwg-terms/w;    sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-tdwg-groups/w;   sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-tdwg-groups/sig; sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-workbench/w; sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php
 cd /var/www/v-zsm/w;       sudo -u www-data php ./maintenance/rebuildFileCache.php 0 overwrite --conf ./LocalSettings.php

 # refreshImageMetadata.php
 cd /var/www/metawiki;             sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/studienstiftungswiki; sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/testwiki;             sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/testwiki2;            sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/v-floramalesiana/w;   sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/v-gbif-d/w;           sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/v-ispi/w;   sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/v-k2n/w;    sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/v-k2n/h;    sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/v-k2n/sl;   sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/v-lias/w;   sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/v-nnvm/w;   sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/v-on/w;     sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/v-orowiki/w;sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/v-phytomed/w;       sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/v-phytopathology/w; sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/v-plantnet/terms/e; sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/v-plantnet/terms/f; sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/v-plantnet/uses/e;  sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/v-plantnet/uses/f;  sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/v-rosaceae/w;  sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/v-species/f;   sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/v-species/o;   sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/v-species/s;   sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/v-species/w;   sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/v-workbench/w; sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php
 cd /var/www/v-zsm/w;       sudo -u www-data php ./maintenance/refreshImageMetadata.php --force --conf ./LocalSettings.php


Note: do not try to update /var/www/zzz...templates.... It won't work, LocalSettings is missing.

For semantic mediawiki extension (SMW) click on "Initialise or upgrade tables" on SpecialPage Semantic Admin:

OR RUN SCRIPTS like:

  • for some maintenance scripts temporary tables are created that need --dbuser=wikiadmin
 cd /var/www/testwiki; 
 sudo -u www-data php ./maintenance/update.php  --quick --conf ./LocalSettings.php 
 sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 # rebuildData.php --help
 #   -f Fully delete all content instead of just refreshing
 #   -t refresh only type pages
 #   -c refresh only category pages
 #   -p refresh only property pages
 #   -v be verbose about the progress
 # rebuild all data completely from scratch
 # sudo -u www-data php ./extensions/SemanticMediaWiki/maintenance/rebuildData.php --dbuser=wikiadmin -fv --conf=./LocalSettings.php 
 # just update all relevant data
 sudo -u www-data php ./extensions/SemanticMediaWiki/maintenance/rebuildData.php --dbuser=wikiadmin -v --conf=./LocalSettings.php 
 sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 sudo /usr/sbin/apache2ctl -k graceful && sudo service nginx restart && sudo service php5-fpm restart

See also Maintenance scripts above for further scripts.

Upgrade-Checklist of issues and task

When upgrading to a new wiki core check the following issues

Cron jobs

  • valid path? e.g. /extensions/CommonsMediaCaching/runJobs.sh. See /etc/cron…

Cache and Media folders

Cache is the file cache, to reduce server load when used by not-logged-in users.

Cleaning corrupt Cache

for f in /mnt/dump/var/www/*cache/*/*/*.html; do sudo rm "$f"; done
for f in /mnt/dump/var/www/*cache/*.cdb; do sudo rm "$f"; done
for f in /mnt/dump/var/www/*cache/*; do sudo rm "$f" -r; done
sudo /usr/sbin/apache2ctl -k graceful && sudo service nginx restart && sudo service php5-fpm restart


Moving Cache and Media folders to different partition

Only limited space exists on the root partition itself. Larger Wiki have their Media and Cache folders relocated to the the /mnt/storage and /mnt/dump partitions, respectively. The cache of the following Wikis is presently in /mnt/dump/var/www/: testwiki-cache; v-ispi-w-cache; v-k2n-w-cache; v-lias-w-cache; v-nnvm-w-cache; v-on-w-cache; v-orowiki-w-cache; v-species-o-cache; v-species-w-cache. Move like:

### manual version
# create folders on dump, then change owner and group:
 cd /mnt/dump/var/www; sudo mkdir v-lias-w-cache; sudo chown www-data *; sudo chgrp www-data *;
# remove current cache, create link to new folder:
 cd /var/www/v-lias/w;     sudo rm cache -r; sudo ln -s /mnt/dump/var/www/v-lias-w-cache  cache

### script version 
# create folders on dump, then change owner and group:
var_dump_path="/mnt/dump/var/www";
var_dump_folder="v-lias-w-cache";
web_wiki_base_path="/var/www/v-lias/w",
sudo mkdir --parent "${var_dump_path}/${var_dump_folder}"; 
sudo chown www-data "${var_dump_path}/${var_dump_folder}"; 
sudo chgrp www-data "${var_dump_path}/${var_dump_folder}";
# remove current cache, create link to new folder:
sudo rm "${web_wiki_base_path}/cache" -r;
# make a symlink
cd "${web_wiki_base_path}" && sudo ln -s "${var_dump_path}/${var_dump_folder}" "cache"

For linking media folder (to Storage, not Dump!):

cd /mnt/storage/; sudo mkdir var-www-v-species-w-media;
sudo chown www-data var-www-v-species-w-media; sudo chgrp www-data var-www-v-species-w-media;
sudo cp /var/www/v-species/w/media /mnt/storage/var-www-v-species-w-media
## check and manually delete old media folder! Then create link:
cd /var/www/v-species/w; sudo ln -s /mnt/storage/var-www-v-species-w-media media

General topics

MediaWiki configuration tips

Configuring MediaWiki:Sidebar: New options July 2008, see [2]

It may be useful to copy the contents of http://en.wikipedia.org/wiki/MediaWiki:Common.css and http://en.wikipedia.org/wiki/MediaWiki:Monobook.css into the Mediawiki:Common.css and MediaWiki:Monobook.css pages of each Wiki where you may want to use copied things e.g. templates from wikipedia.

File uploading and Mime types

Uploading files with extensions and Content types (MIME types) usually not allowed on wikis: The default of normally allowed extensions is listed $wgFileExtensions in /includes/DefaultSettings.php (which should never be edited). To allow additional extensions override $wgFileExtensions in LocalSettings.php.

There are also $wgMimeTypeBlacklist and $wgFileBlacklist for file extensions and MIME types that are never allowed for security reasons, even if added to $wgFileExtensions. If needed for special purposes and considered safe, they can be commented out in these blacklists in LocalSettings.php.

If there is still the error message "The file is corrupt or has an incorrect extension. Please check the file and upload again", the reason can be that the file you want to upload has a MIME type for which only certain file extensions are allowed in /includes/mime.types and has an extension not listed there. If considered safe, the extension can be added in that file. The mime type can be determined with the command file -i filename. Note: Files that are changed manually are then excluded from svn update. To drop own changes and get back to the svn version delete the file and then run svn update (see above).

Logging/Debugging

For debugging, you may enable logging of debug and error messages:

# create a log-file somewhere
  sudo touch /var/www/v-k2n/w/log.txt
  sudo chmod 777 /var/www/v-k2n/w/log.txt
# edit LocalSettings.php and add the following line after the line including the DefaultSettings.php:
  $wgDebugLogFile = "/var/www/v-k2n/w/log.txt";

Note, that the logfile will grow fast, so one should switch on the logging only for short periods of time, and delete the logfile after done.

PHP debugging can be done with xdebug. Details see Mediawiki debugging.

Apply a Patch Manually to a File (LTS Version)

Some branches of a MediaWiki Long Term Support (LTS) version seem not to be “back”-integrated in an older branch, e.g. origin/REL1_23. So one has to apply bug-fixes manually by applying a patch to a file for a LTS version:

  1. download and extract the file reported as being fixed (example: ApiQueryImageInfo.php)
  2. move it to the folder of the LTS version
  3. check differences, create a patch
  4. apply the patch

(TODO: There is possibly also a way to integrate a git pull to a specific branch)

# set variables
mw_LTS_version_source_path="/usr/share/mediawiki20"
mw_LTS_version_source_extension_path="${mw_LTS_version_source_path}/extensions"
# go to the source folder to apply the patch
cd "${mw_LTS_version_source_path}/includes/api"
# have the downloaded and extracted file already in place
# use wget and tar -x
### check differences ##
# vimdiff ApiQueryImageInfo.php ApiQueryImageInfo_new-64d8aeda6305b64974731c4408b85e92225f1752.php
#   move left-down-top-right by h←, j↓, k↑, l→ 
#   quit and type ":q" to quit split vimdiff window one by one (i.e. twice ":q")
### create patch ###
# diff --unified oldfile newfile > file.diffpatch
sudo diff --unified  ApiQueryImageInfo.php ApiQueryImageInfo_new-64d8aeda6305b64974731c4408b85e92225f1752.php > 'ApiQueryImageInfo_Internal_error_in_ApiResult::setElement:Bad_parameter.diffpatch'
# apply the patch
sudo patch < "ApiQueryImageInfo_Internal_error_in_ApiResult::setElement:Bad_parameter.diffpatch"
# reverse the patch
# sudo patch --reverse < "ApiQueryImageInfo_Internal_error_in_ApiResult::setElement:Bad_parameter.diffpatch"

Backup/Restore in general

Backing up the database alone is documented here: http://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki. A more complete script can be found here: http://www.mediawiki.org/wiki/User:Flominator/Backup_MW - this also backups the folder with uploads (media). Based on that source, adapted scripts were created, execute as:

 cd /var/backups/scripts/; ./backup-mw.sh

The additional backup-mw.php script can potentially be used within www to directly create and download a copy of the mediawiki. We are considering this as a measure to build trust.

In addition, to create an xml dump, make sure a link to AdminSettings.php exists in the current wiki folder and the maintenance folder is temporarily copied, then run, e.g.:

 cd /var/www/v-on/w;   sudo -u www-data php ./maintenance/dumpBackup.php  --full --conf ./LocalSettings.php > /var/www/v-orowiki/w/media/full.xml

To restore such a xml-dump, remove tables and create new tables with default values in mysql, then:

 cd /var/www/WIKINAME;  # (replace path with actual wiki path!)
 php ./maintenance/importDump.php /var/backups/wikis/k2n-full.xml --conf ./LocalSettings.php
 php ./maintenance/rebuildrecentchanges.php --conf ./LocalSettings.php    # absolutely necessary
 ## If backlinks etc. do not work, or extensions had to be disabled, use (Very slow!!!!):
 php ./maintenance/rebuildall.php  --quick --conf ./LocalSettings.php

Notes: In our experience, some extensions may create problems during reimport. We found GoogleMaps and DynamicPageList to cause importDump to abort. After disabling these two extensions, the import worked correctly. However, all DPL pages are then still cached without proper DPL rendering even after re-enabling both extensions. Running rebuildall.php fixed this.

Example restore for testing of the wikimediafoundation commons xml-dump:

 cd /var/www/wmf-commons; php ./maintenance/importDump.php  /mnt/wpTest/commonswiki-pages-articles.xml  --conf ./LocalSettings.php

Refresh SemanticMW data

If it becomes necessary to delete all SMW data in a particular wiki and regenerate the data again from the individual pages the following command lines can be used:

 cd /var/www/WIKINAME;  # (replace path with actual wiki path!)
 sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php
 # rebuildData.php
 # -f Fully delete all content instead of just refreshing
 # -t refresh only type pages
 # -c refresh only category pages
 # -p refresh only property pages
 # -v be verbose about the progress
 ### rebuild data completely from scratch
 # sudo -u www-data php ./extensions/SemanticMediaWiki/maintenance/rebuildData.php --dbuser=wikiadmin -fv --conf=./LocalSettings.php 
 # # may work only with equal sign = in --conf=./LocalSettings.php

 ### just update relevant data (a category) or all data
 # # may work only with equal sign = in --conf=./LocalSettings.php
 sudo -u www-data php ./extensions/SemanticMediaWiki/maintenance/rebuildData.php --dbuser=wikiadmin --query='[[Category:ThisandThat]]' --conf=./LocalSettings.php

 sudo -u www-data php ./extensions/SemanticMediaWiki/maintenance/rebuildData.php --dbuser=wikiadmin -v --conf=./LocalSettings.php 
  
 sudo -u www-data php ./maintenance/runJobs.php -v --procs 4 --conf ./LocalSettings.php

Notes:

  1. change to the local directory of the wiki to be refreshed,
  2. make sure all outstanding jobs are completed,
  3. delete all SMW data,
  4. regenerate the data from the individual pages.

The last step can take some time (e.g. about 10 minutes to refresh about 4000 IDs). The wiki seems to work normally during that time but queries may be effected. For that reason it is recommended to implement this operation during a maintenance window.

During step 4 the procedure slows down after about 5 min. and can be sped up by:

  1. interrupting the procedure by using Crtl-C
  2. restarting the last command by specifying the next ID to be processed, e.g.
php ./extensions/SemanticMediaWiki/maintenance/rebuildData.php -v -s 2062 --conf ./LocalSettings.php # may work only with --conf=./LocalSettings.php

if 2061 IDs had been already processed at the time of the interruption.



See also: Mediawiki installation