get 1.28 changes, small doc addition
[mediawiki-setup] / Mediawiki_Setup_Guide
1 == Introduction ==
2
3 '''tldr''': For GNU/Linux (with a bit of Debian bias), a more concise, holistic and automated install than the official Mediawiki docs. Do some initial configuration then download this page and run it, or execute it as you read.
4
5 ''' Goals / Why use this guide? '''
6
7 * Good recommendations. Official docs mostly avoid recommendations among a myriad of possibilities
8 * Closely references & supplements official documentation
9 * Explicit automation support wherever practical
10 * Used to setup this site (style optional)
11 * Contributions welcome and will be updated/tested on this very site!
12 * Support for multiple gnu/linux distros
13 * Holistic scope (backups, server setup), but sections stand on their own
14 * Explicit support for production & local testing instance. Additions for production like https and web analytics.
15 * Edits to this page are closely monitored by the original author.
16
17 '''Assumptions'''
18
19 * Self hosting, single GNU/Linux system with Bash shell
20 * Root shell is assumed throughout
21 * Code blocks are [https://en.wikipedia.org/wiki/Idempotent idempotent]
22
23 '''Version Support'''
24
25 Very minor adjustments needed for other distros. Help expand this list.
26 * Mediawiki 1.27 & 1.28
27 * Debian 8 + backports
28 * Debian 8
29 * Debian testing (last tested Aug 7, 2016)
30
31 Pre 5/2016 revisions ran Mediawiki 1.23, tested on Fedora 20 and Ubuntu 14.04.
32
33 == Prerequisites ==
34
35 '''Getting a Server & a Domain'''
36
37 The most common route and the one taken by this site is buying a domain name from a site like namecheap, and a cheap vps from companies like linode or digital ocean. They have good getting started guides which mostly apply beyond their own sites.
38
39 '''Email Setup'''
40
41 Setting up email can be an involved process, and this guide assumes that a some program (usually postfix or exim) is implementing a functional sendmail interface. Mediawiki uses email with to send password reminders or notifications, and this guide includes cronjobs for updating mediawiki and doing backups which will send mail in the case of an error. Email is also the recommended way to get notifications of package updates which require manual steps such as restarting of services.
42
43 If you are not setting up your server to send mail with a program that uses the default sendmail interface, see these pages when you are configuring mediawiki: [[mediawikiwiki:Manual:$wgEnableEmail|Manual:$wgEnableEmail]], [https://www.mediawiki.org/wiki/Configuration_settings#Email_settings Manual:Email_settings], [[mediawikiwiki:Manual:$wgSMTP|Manual:$wgSMTP]]
44
45 == Setup Guide Configuration ==
46
47 # Set variables below
48 # Save the code in this section to a file (~/mw_vars is suggested)
49 # Source it at the beginning of scripts containing later commands
50 # Source it from your .bashrc file while you are setting up Mediawiki
51
52 '''Requires customization:'''
53 <source lang="bash" type="example">
54 # Replace REPLACE_ME as appropriate
55
56 export mwdescription="REPLACE_ME" # eg. Opinionated Free Software Wiki
57
58 # username/pass of the first wiki admin user
59 export wikiuser="REPLACE_ME"
60 export wikipass=REPLACE_ME
61
62 # root password for the mysql database
63 export dbpass=REPLACE_ME
64
65 export mwdomain=REPLACE_ME # domain name. for this site, it's ofswiki.org
66
67 # customize these questions. Try not to have the answer be a word in the question.
68 captchaArray() {
69 if ! grep -Fx '$localSettingsQuestyQuestions = array (' $mwc; then
70 tee -a $mwc <<'EOF'
71 $localSettingsQuestyQuestions = array (
72 "What is the name of the wiki software this site (and wikipedia) uses?" => "Mediawiki",
73 "REPLACE_ME with a question" => "REPLACE_ME with an answer"
74 );
75 EOF
76 fi
77 }
78
79 # The rest of this section will work fine with no changes.
80
81 # git branch for mediawiki + extensions.
82 # This guide has only been tested with 1_28.
83 # branch names: https://git.wikimedia.org/branches/mediawiki%2Fcore.git
84 export mw_branch=REL1_28
85
86 # As set by gui installer when choosing cc by sa.
87 export mw_RightsUrl='https://creativecommons.org/licenses/by-sa/4.0/'
88 export mw_RightsText='Creative Commons Attribution-ShareAlike'
89 export mw_RightsIcon='$wgScriptPath/resources/assets/licenses/cc-by-sa.png'
90
91 # Alphanumeric site name for pywikibot.
92 # Here we use the domain minus the dots, which should work fine without changing.
93 export mwfamily=${mwdomain//./}
94 # install path for mediawiki. This should work fine.
95 export mw=/var/www/$mwdomain/html/w
96
97
98 # wiki sender address / wiki & wiki server contact email.
99 # see email section for more info on email
100 export mw_email="admin@$mwdomain"
101
102 # Leave as is:
103 mwc="$mw/LocalSettings.php"
104 </source>
105
106 == Download this page and run it ==
107
108 This is an option to do automated setup. Optional code blocks are skipped (they have a bold warning just before them and a tag on the source block). The only important things left after running this are running the automated backup setup code on another machine.
109
110 ''' Requires manual step: inspect output file: /tmp/mw-setup, then run it'''
111 <source lang="bash" type="example">
112 start=' *<source lang="bash"> *'
113 end=' *<\/source> *'
114 ruby <<'EOF' | sed -rn "/^$start$/,/^$end$/{s/^$start|$end$/# \0/;p} > /tmp/mw-setup"
115 require 'json'
116 puts JSON.parse(`curl 'https://ofswiki.org/w/api.php?\
117 action=query&titles=Mediawiki_Setup_Guide&prop=revisions&rvprop=content&\
118 format=json'`.chomp)['query']['pages'].values[0]['revisions'][0]['*']
119 EOF
120 chmod +x /tmp/mw-setup
121 </source>
122
123 == Required Bash Functions ==
124
125 Here we define some small useful bash functions. This should be part of the same ~/mw_vars file if you are running the code step by step.
126
127 <source lang="bash">
128 # identify if this is a debian based distro
129 isdeb() { command -v apt &>/dev/null; }
130 # tee unique. append each stdin line if it does not exist in the file
131 teeu () {
132 local MAPFILE
133 mapfile -t
134 for line in "${MAPFILE[@]}"; do
135 grep -xFq "$line" "$1" &>/dev/null || tee -a "$1" <<<"$line"
136 done
137 }
138
139 # get and reset an extension/skin repository, and enable it
140 mw-clone() {
141 local url=$1
142 local original_pwd="$PWD"
143 local name
144 local re='[^/]*/[^/]*$'
145 [[ $url =~ $re ]] ||:
146 target=$mw/${BASH_REMATCH[0]}
147 if [[ ! -e $target/.git ]]; then
148 git clone $url $target
149 fi
150 if ! cd $target; then
151 echo "mw-ext error: failed cd $target";
152 exit 1
153 fi
154 git fetch
155 git checkout -qf origin/$mw_branch || git checkout -qf origin/master
156 git clean -xffd
157 cd "$original_pwd"
158
159 }
160 mw-ext () {
161 local ext
162 for ext in "$@"; do
163 mw-clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/$ext
164 if [[ -e $mw/ext/$ext/extension.json ]]; then
165 # new style extension. remove old style declaration
166 sed -i --follow-symlinks '#^require_once( "\\\$IP/extensions/\$ext/\$ext\.php" );#d' $mwc
167 teeu $mwc <<EOF
168 wfLoadExtension( '$ext' );
169 EOF
170 else
171 teeu $mwc <<EOF
172 require_once( "\$IP/extensions/$ext/$ext.php" );
173 EOF
174 fi
175 done
176 # --quick is quicker than default flags,
177 # but still add a sleep to make sure everything works right
178 sudo -u $apache_user php $mw/maintenance/update.php -q --quick; sleep 1
179 }
180 mw-skin() {
181 local skin=$1
182 mw-clone https://gerrit.wikimedia.org/r/p/mediawiki/skins/$skin
183 sed -i --follow-symlinks '/^wfLoadSkin/d' $mwc
184 sed -i --follow-symlinks '/^\$wgDefaultSkin/d' $mwc
185 teeu $mwc <<EOF
186 \$wgDefaultSkin = "${skin,,*}";
187 wfLoadSkin( '$skin' );
188 EOF
189 sudo -u $apache_user php $mw/maintenance/update.php -q --quick; sleep 1
190 }
191
192 if command -v apt &>/dev/null; then
193 apache_user=www-data
194 else
195 apache_user=apache
196 fi
197
198 </source>
199
200 == Install Mediawiki Dependencies ==
201
202 The best way to get core dependencies is to install the mediawiki package itself. Nothing about it will get in the way of using a version from upstream.
203
204 [[mediawikiwiki:Main Page|Mediawiki Main Page]]: the beginning of the official docs.
205
206 [[mediawikiwiki:Manual:Installation_requirements|Manual:Installation_requirements]]: Overview of installation requirements.
207
208 Note, this guide needs a little adjustment before it will work with php7.0: make sure settings are still valid, update ini path.
209
210
211
212 <source lang="bash">
213 # From here on out, exit if a command fails.
214 # This will prevent us from not noticing an important failure.
215 # We recommend setting this for the entire installation session.
216 # If you are running commands interactively, it might be best to
217 # put it in your ~/.bashrc temporarily.
218 set -eE -o pipefail
219 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
220 source ~/mw_vars
221
222 if isdeb; then
223 # main reference:
224 # https://www.mediawiki.org/wiki/Manual:Running_MediaWiki_on_Ubuntu
225 apt-get update
226 DEBIAN_FRONTEND=noninteractive apt-get install -y imagemagick
227 if apt-get install -s mediawiki &>/dev/null; then
228 # mediawiki is packaged in jessie backports.
229 DEBIAN_FRONTEND=noninteractive apt-get -y install php5-apcu mediawiki
230 else
231 # https://www.mediawiki.org/wiki/Manual:Installation_requirements
232 if apt-get install -s php7.0 &>/dev/null; then
233 # note, 7.0 is untested by the editor here, since it's not
234 # available in debian 8. it's listed as supported
235 # in the mediawiki page.
236 # noninteractive to avoid mysql password prompt.
237 DEBIAN_FRONTEND=noninteractive apt-get install -y apache2 \
238 default-mysql-server \
239 php7.0 php7.0-mysql libapache2-mod-php7.0 php7.0-xml \
240 php7.0-apcu php7.0-mbstring
241 else
242 # note: mbstring is recommended, but it's not available for php5 in
243 # debian jessie.
244 DEBIAN_FRONTEND=noninteractive apt-get install -y apache2 \
245 default-mysql-server \
246 php5 php5-mysql libapache2-mod-php5 php5-apcu
247 fi
248 fi
249 service apache2 restart
250 else
251 # note
252 # fedora deps are missing a database, so some is translated from debian packages
253 yum -y install mediawiki ImageMagick php-mysqlnd php-pecl-apcu mariadb-server
254
255 systemctl restart mariadb.service
256 systemctl enable mariadb.service
257 systemctl enable httpd.service
258 systemctl restart httpd.service
259 fi
260
261
262 # slightly different depending on if we already set the root pass
263 if echo exit|mysql -u root -p"$dbpass"; then
264 # answer interactive prompts:
265 # mysql root pass, change pass? no, remove anon users? (default, yes)
266 # disallow remote root (default, yes), reload? (default, yes)
267 echo -e "$dbpass\nn\n\n\n\n" | mysql_secure_installation
268 else
269 # I had 1 less newline at the start when doing ubuntu 14.04,
270 # compared to debian 8, so can't say this is especially portable.
271 # It won't hurt if it fails.
272 echo -e "\n\n$dbpass\n$dbpass\n\n\n\n\n" | mysql_secure_installation
273 fi
274 </source>
275
276
277 '''Skippable notes'''
278
279
280 php[5]-mysqlnd is a faster mysql driver package, but the default in debian php-mysql, appparently because some non-mediawiki packages are not compatible with it. If you run into this issue, simply use the php-mysql package.
281
282
283 Additional packages rational
284 * ImageMagick is [https://www.mediawiki.org/wiki/Manual:Image_administration#Image_thumbnailing recommended].
285 * Gui install and [[mediawikiwiki:Manual:Cache]] recomend the apc package.
286 * Clamav for virus scanning of uploads is mentioned in the mediawiki manual. However, wikipedia doesn't seem to do it, so it doesn't seem like it's worth bothering. It also makes uploading a set of images take twice as long on broadband.
287
288 == Install Mediawiki ==
289
290
291 Here, we [[mediawikiwiki:Download_from_Git]], or reset our installation if it is already there, and create the wiki database. [[mediawikiwiki:Manual:Installing_MediaWiki]]
292
293 <source lang="bash">
294 mkdir -p $mw
295 cd $mw
296 # this will just fail if it already exists which is fine
297 if [[ ! -e .git ]]; then
298 git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git .
299 fi
300 # to see available branches: https://www.mediawiki.org/wiki/Version_lifecycle
301 # and
302 # git branch -r
303 git checkout -f origin/$mw_branch
304 git clean -ffxd
305 # Get the php libraries wmf uses. Based on:
306 # https://www.mediawiki.org/wiki/Download_from_Git#Fetch_external_libraries
307 if [[ ! -e vendor/.git ]]; then
308 git clone https://gerrit.wikimedia.org/r/p/mediawiki/vendor.git
309 fi
310 cd vendor
311 git checkout -f origin/$mw_branch
312 cd ..
313
314 # Drop any previous database which may have been installed while testing.
315 # If upgrading, we should have a db backup which will get restored.
316 # https://www.mediawiki.org/wiki/Manual:Upgrading
317 mysql -u root -p$dbpass <<'EOF' ||:
318 drop database my_wiki;
319 exit
320 EOF
321 php $mw/maintenance/install.php --pass $wikipass --scriptpath /w \
322 --dbuser root --dbpass $dbpass "$mwdescription" "$wikiuser"
323 teeu $mwc <<'EOF'
324 # lock down the wiki to only the initial owner until anti-spam measures are put in place
325 # limit edits to registered users
326 $wgGroupPermissions['*']['edit'] = false;
327 # don't allow any account creation
328 $wgGroupPermissions['*']['createaccount'] = false;
329 EOF
330 </source>
331
332
333 Note: When testing, you may need to clear the apc cache to see changes take effect in the browser. Simplest solution is
334 just restart apache. http://stackoverflow.com/questions/911158/how-to-clear-apc-cache-entries
335
336 ''' Skippable Notes'''
337
338 If we wanted to reset our installation, but leave the extension repositories alone, alter the command above to be <code>git clean -fxd</code>
339
340 '''Rational for choosing git sources'''
341
342 Upstream vs distro packages. Upstream is responsive, and it's distributed within a single directory, so packaging does not integrate with the distro's filesystem. The only potential value would be less bugs by using stable versions, but we choose not to make that tradeoff.
343
344 Why use git over zip file releases? Mediawiki supports git usage through release branches which get post-release fixes. This means we can auto-update, get more granular fixes, easier to manage updates, and rollbacks.
345
346 == Configure Apache ==
347
348 Note, non-debian based installs: modify instructions below to use /etc/httpd/conf.d/$mwdomain.conf, and don't run a2ensite.
349
350 I use scripts I maintains separately to setup Let's Encrypt certificates and apache config: (url pending).
351
352 If you are doing a test setup on your local machine, you can make your domain resolve to your local test installation, then remove it later when you are done. Note, you will need non-local site to get Let's Encrypt certificates, and then transfer them locally, or disable ssl from the apache config (neither is covered here) and replace all instances of https in these instructions with http. Another option is to get a cheap 2 dollar domain for your test site.
353
354 '''Not for production:'''
355 <source lang="bash" type="example">
356 teeu /etc/hosts<<<"127.0.0.1 $mwdomain"
357 </source>
358
359 To not use my scripts, and still use Let's Encrypt: follow this doc page: https://letsencrypt.org/getting-started/. It's a little long winded, so I would boil it down to this:
360
361 '''Optional & requires additional steps:'''
362 <source lang="bash" type="example">
363 git clone https://github.com/certbot/certbot
364 cd certbot
365 ./certbot-auto apache
366 cd /etc/apache/sites-available
367 mv 000-default-le-ssl.conf $mwdomain.conf
368 rm ../sites-enabled/000-default-le-ssl.conf
369 # edit $mwdomain.conf, so documentroot is /var/www/$mwdomain/html
370 # and ServerName is $mwdomain
371 a2ensite $mwdomain.conf
372 </source>
373 Then, copy the input to apache-site below and insert it into the apache config.
374
375 Here, we use some scripts automate setting up the Let 's Encrypt cert and
376 the apache config.
377
378 <source lang="bash">
379 temp=$(mktemp -d)
380 cd $temp
381 git_site=https://iankelling.org/git
382 git clone $git_site/acme-tiny-wrapper
383 l=$mw/../../logs
384 mkdir -p $l
385
386 acme-tiny-wrapper/acme-tiny-wrapper -t $mwdomain
387
388 git clone $git_site/basic-https-conf
389 { cat <<EOF
390 ServerAdmin $mw_email
391 RewriteEngine On
392 # make the site's root url go to our main page
393 RewriteRule ^/?wiki(/.*)?\$ %{DOCUMENT_ROOT}/w/index.php [L]
394 # use short urls https://www.mediawiki.org/wiki/Manual:Short_URL
395 RewriteRule ^/*\$ %{DOCUMENT_ROOT}/w/index.php [L]
396 EOF
397 find -L $(readlink -f $mw) -name .htaccess \
398 | while read line; do
399 echo -e "<Directory ${line%/.htaccess}>\n $(< $line)\n</Directory>";
400 done
401 } | basic-https-conf/apache-site -r ${mw%/*} - $mwdomain
402 cd
403 rm -rf $temp
404 </source>
405
406 Now mediawiki should load in your browser at $mwdomain .
407
408 Allow proper search bots and internet archiver bots, via [[Mediawiki:Robots.txt]],
409 and install the default skin.
410
411 <source lang="bash">
412 dd of=$mw/../robots.txt <<'EOF'
413 User-agent: *
414 Disallow: /w/
415 User-agent: ia_archiver
416 Allow: /*&action=raw
417 EOF
418 mw-skin Vector
419 </source>
420
421 '''Skippable Notes'''
422
423 This section assumes we are redirecting www to a url without www.
424
425 [http://httpd.apache.org/docs/current/howto/htaccess.html Apache recommends] moving .htaccess rules into it's config for performance. So we look for .htaccess files from mediawiki and copy their contents into this config. In modern apache versions, we would have to explicitly set options like AllowOverride to allow .htaccess files to take effect.
426
427 == Mediawiki Settings ==
428
429 Overall reference: [[mediawikiwiki:Manual:Configuration_settings]].
430
431 Settings which the gui setup prompts for but aren't set by the automated install script.
432 <source lang="bash">
433 teeu $mwc<<EOF
434 \$wgServer = "https://$mwdomain";
435 \$wgDBserver = "localhost";
436 \$wgRightsUrl = "$mw_RightsUrl";
437 \$wgRightsText = "$mw_RightsText";
438 \$wgRightsIcon = "$mw_RightsIcon";
439 EOF
440 </source>
441 Settings I recommend which are different than the defaults.
442 <source lang="bash">
443 teeu $mwc<<EOF
444 \$wgPasswordSender = "$mw_email";
445 \$wgEmergencyContact = "$mw_email";
446 \$wgEnotifUserTalk = true; # UPO
447 \$wgEnotifWatchlist = true; # UPO
448 \$wgMainCacheType = CACHE_ACCEL;
449 \$wgEnableUploads = true;
450 \$wgUseInstantCommons = true;
451 EOF
452 </source>
453
454 Other misc settings
455 <source lang="bash">
456 teeu $mwc <<'EOF'
457 # from https://www.mediawiki.org/wiki/Manual:Short_URL
458 $wgArticlePath = "/wiki/$1";
459
460 # https://www.mediawiki.org/wiki/Manual:Combating_spam
461 # check that url if our precautions don't work
462 # not using nofollow is good practice, as long as we avoid spam.
463 $wgNoFollowLinks = false;
464 # Allow user customization.
465 $wgAllowUserCss = true;
466
467 # use imagemagick over GD
468 $wgUseImageMagick = true;
469 EOF
470
471
472 # https://www.mediawiki.org/wiki/Manual:Configuring_file_uploads
473 # Increase from default of 2M to 100M.
474 # This will at least allow high res pics etc.
475 php_ini=$(php -r 'echo(php_ini_loaded_file());')
476 sed -i --follow-symlinks 's/^\(upload_max_filesize\|post_max_size\)\b.*/\1 = 100M/' $php_ini
477 if isdeb; then
478 service apache2 restart
479 else
480 systemctl restart httpd.service
481 fi
482
483 # if you were to install as a normal user, you would need this for images
484 # sudo usermod -aG $apache_user $USER
485
486 # this doesn't propogate right away
487 chgrp -R $apache_user $mw/images
488 chmod -R g+w $mw/images
489 </source>
490
491 Style settings. Omit to use a different style.
492 <source lang="bash">
493 teeu $mwc <<'EOF'
494 $wgLogo = null;
495 #$wgFooterIcons = null;
496 EOF
497 # Make the toolbox go into the drop down.
498 cd $mw/skins/Vector
499 if ! git remote show ian-kelling &>/dev/null; then
500 git remote add ian-kelling https://iankelling.org/git/forks/Vector
501 fi
502 git fetch ian-kelling
503 git checkout ian-kelling/${mw_branch}-toolbox-in-dropdown
504 </source>
505
506 == Install and Configure Mediawiki Extensions ==
507
508 When installing extensions on a wiki with important content, backup first as a precaution.
509
510 ''' Extensions with no configuration needed '''
511
512 {| class="wikitable"
513 ! Name
514 ! Description
515 |-
516 | [[mediawikiwiki:Extension:Cite|Extension:Cite]]
517 | Have references in footnotes.
518 |-
519 | [[mediawikiwiki:Extension:CiteThisPage|Extension:CiteThisPage]]
520 | Ability to generate citations to pages in a variety of styles.
521 |-
522 | [[mediawikiwiki:Extension:CSS|Extension:CSS]]
523 | Allows CSS stylesheets to be included in specific articles
524 |-
525 | [[mediawikiwiki:Extension:Echo|Extension:Echo]]
526 | Notification subsystem for usage by other extensions
527 |-
528 | [[mediawikiwiki:Extension:Gadgets|Extension:Gadgets]]
529 | UI extension system for users
530 |-
531 | [[mediawikiwiki:Extension:ImageMap|Extension:ImageMap]]
532 | Links for a region of an image
533 |-
534 | [[mediawikiwiki:Extension:Interwiki|Extension:Interwiki]]
535 | Tool for nice links to other wikis
536 |-
537 | [[mediawikiwiki:Extension:News|Extension:News]]
538 | Embed or rss recent changes
539 |-
540 | [[mediawikiwiki:Extension:Nuke|Extension:Nuke]]
541 | Mass delete of pages, in the case of spam
542 |-
543 | [[mediawikiwiki:Extension:ParserFunctions|Extension:ParserFunctions]]
544 | Useful for templates
545 |-
546 | [[mediawikiwiki:Extension:Poem|Extension:Poem]]
547 | Useful for formatting things various ways
548 |-
549 | [[mediawikiwiki:Extension:SyntaxHighlight_GeSHi|Extension:SyntaxHighlight_GeSHi]]
550 | Source code highlighting
551 |-
552 | [[mediawikiwiki:Extension:Variables|Extension:Variables]]
553 | Define per-page variables
554 |}
555
556 <source lang="bash">
557 mw-ext Cite CiteThisPage CSS Echo Gadgets ImageMap Interwiki News \
558 Nuke ParserFunctions Poem SyntaxHighlight_GeSHi Variables
559 </source>
560
561
562 ''' [[mediawikiwiki:Extension:AntiSpoof|Extension:AntiSpoof]]: Disallow usernames with unicode trickery to look like existing names'''
563
564 <source lang="bash">
565 mw-ext AntiSpoof
566 # recommended setup script to account for existing users
567 sudo -u $apache_user php $mw/extensions/AntiSpoof/maintenance/batchAntiSpoof.php
568 </source>
569
570
571 ''' [[mediawikiwiki:CheckUser|Extension:CheckUser]]: Get ip addresses from inside mediawiki so you can ban users'''
572
573 On <= 1.27, requires special install steps or we can get into a bad state. Add a sleep like the default of update.php to avoid errors.
574 <source lang="bash">
575 mw-ext CheckUser
576 if [[ -e $mw/extensions/CheckUser/install.php ]]; then
577 sudo -u $apache_user php $mw/extensions/CheckUser/install.php; sleep 1
578 fi
579 </source>
580
581
582 '''[[mediawikiwiki:Extension:Wikidiff2|Extension:Wikidiff2]]: Faster and international character supported page diffs'''
583
584 I used packaged version since this is a c++ and probably not very tied to the Mediawiki version. This isn't packaged in fedora, haven't gotten around to testing and adding the code to compile it for fedora.
585 <source lang="bash">
586 if isdeb; then
587 apt-get -y install php-wikidiff2
588 teeu $mwc <<'EOF'
589 $wgExternalDiffEngine = 'wikidiff2';
590 EOF
591 dir=$(dirname $(php -r 'echo(php_ini_loaded_file());'))/../apache2/conf.d
592 ln -sf ../../mods-available/wikidiff2.ini $dir
593 service apache2 restart
594 fi
595 </source>
596
597
598 ''' [[mediawikiwiki:Extension:Math|Extension:Math]] Display equations'''
599
600 <source lang="bash">
601 mw-ext Math
602 # php5-curl according to Math readme
603 if isdeb; then
604 curl_pkg=php7.0-curl
605 if ! apt-get -s install $curl_pkg &>/dev/null; then
606 curl_pkg=php5-curl
607 fi
608 apt-get -y install latex-cjk-all texlive-latex-extra texlive-latex-base \
609 ghostscript imagemagick ocaml $curl_pkg make
610 else
611 # todo, php5-curl equivalent on fedora
612 yum -y install texlive-cjk ghostscript ImageMagick texlive ocaml
613 fi
614 service apache2 restart
615
616 cd $mw/extensions/Math/math; make # makes texvc
617 cd $mw/extensions/Math/texvccheck; make
618
619 teeu $mwc <<'EOF'
620 # Enable MathJax as rendering option
621 $wgUseMathJax = true;
622 # Enable LaTeXML as rendering option
623 $wgMathValidModes[] = 'latexml';
624 # Set LaTeXML as default rendering option, because it is nicest
625 $wgDefaultUserOptions['math'] = 'latexml';
626 EOF
627 </source>
628
629 '''Skippable notes'''
630
631 There is no current list of package depencies so I took dependencies from mediawiki-math package in Debian 7. Fedora didn't have a mediawik math package, so I just translated from debian. Ocaml is for math png rendering, as backup option to the nicer looking LatexML and MathJax. Debian has texvc package, but it didn't work right for me, plus it required additional configuration in mediawiki settings.
632
633
634 ''' [[mediawikiwiki:Extension:SpamBlacklist|Extension:SpamBlacklist]]: Import/create IP blacklists, mainly for spam'''
635
636 <source lang="bash">
637 mw-ext SpamBlacklist
638 if ! grep -F '$wgSpamBlacklistFiles = array(' $mwc &>/dev/null; then
639 tee -a $mwc <<'EOF'
640 $wgEnableDnsBlacklist = true;
641 $wgDnsBlacklistUrls = array( 'xbl.spamhaus.org', 'dnsbl.tornevall.org' );
642
643 ini_set( 'pcre.backtrack_limit', '10M' );
644 $wgSpamBlacklistFiles = array(
645 "[[m:Spam blacklist]]",
646 "http://en.wikipedia.org/wiki/MediaWiki:Spam-blacklist"
647 );
648 EOF
649 fi
650 </source>
651
652 ''' [[mediawikiwiki:Extension:TitleBlacklist|Extension:TitleBlacklist]]: Anti-spam '''
653
654 <source lang="bash">
655 mw-ext TitleBlacklist
656 if ! grep -F '$wgTitleBlacklistSources = array(' $mwc &>/dev/null; then
657 tee -a $mwc <<'EOF'
658 $wgTitleBlacklistSources = array(
659 array(
660 'type' => 'local',
661 'src' => 'MediaWiki:Titleblacklist',
662 ),
663 array(
664 'type' => 'url',
665 'src' => 'http://meta.wikimedia.org/w/index.php?title=Title_blacklist&action=raw',
666 ),
667 );
668 EOF
669 fi
670 </source>
671
672 ''' [[mediawikiwiki:Extension:WikiEditor|Extension:WikiEditor]]: Editing box extras and a fast preview tab '''
673
674 <source lang="bash">
675 mw-ext WikiEditor
676 teeu $mwc <<'EOF'
677 # Enable Wikieditor by default
678 $wgDefaultUserOptions['usebetatoolbar'] = 1;
679 $wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;
680
681 # Display the Preview and Changes tabs
682 $wgDefaultUserOptions['wikieditor-preview'] = 1;
683 EOF
684 </source>
685
686 ''' [[mediawikiwiki:CategoryTree|Extension:CategoryTree]]: Enables making nice outlines of pages in a category'''
687 <source lang="bash">
688 mw-ext CategoryTree
689 teeu $mwc <<'EOF'
690 # Mediawiki setting dependency for CategoryTree
691 $wgUseAjax = true;
692 EOF
693 </source>
694
695 ''' [[mediawikiwiki:Extension:AbuseFilter|Extension:AbuseFilter]]: Complex abilities to stop abuse '''
696
697 Used by big wiki sites. As a smaller site, we won't use it much, but it's good to have. It's page suggests a few defaults:
698 <source lang="bash">
699 mw-ext AbuseFilter
700 teeu $mwc<<'EOF'
701 $wgGroupPermissions['sysop']['abusefilter-modify'] = true;
702 $wgGroupPermissions['*']['abusefilter-log-detail'] = true;
703 $wgGroupPermissions['*']['abusefilter-view'] = true;
704 $wgGroupPermissions['*']['abusefilter-log'] = true;
705 $wgGroupPermissions['sysop']['abusefilter-private'] = true;
706 $wgGroupPermissions['sysop']['abusefilter-modify-restricted'] = true;
707 $wgGroupPermissions['sysop']['abusefilter-revert'] = true;
708 EOF
709 </source>
710
711 '''[[mediawikiwiki:Extension:ConfirmEdit|Extension:ConfirmEdit]]: Custom Captcha'''
712
713 Uses captchaArray defined in mw_vars.
714
715 <source lang="bash">
716 mw-ext ConfirmEdit
717 captchaArray
718 teeu $mwc <<'EOF'
719 wfLoadExtension( 'ConfirmEdit/QuestyCaptcha' );
720 $wgCaptchaClass = 'QuestyCaptcha';
721 # only captcha on registration
722 $wgGroupPermissions['user' ]['skipcaptcha'] = true;
723 $wgGroupPermissions['autoconfirmed']['skipcaptcha'] = true;
724 EOF
725 if ! grep -Fx 'foreach ( $localSettingsQuestyQuestions as $key => $value ) {' $mwc; then
726 tee -a $mwc <<'EOF'
727 foreach ( $localSettingsQuestyQuestions as $key => $value ) {
728 $wgCaptchaQuestions[] = array( 'question' => $key, 'answer' => $value );
729 }
730 EOF
731 fi
732 </source>
733
734 Enable account creation that we initially disabled.
735 <source lang="bash">
736 sed -i --follow-symlinks "/\\\$wgGroupPermissions\\['\\*'\\]\\['createaccount'\\] = false;/d" $mwc
737 </source>
738
739 == Additional Configuration with Pywikibot ==
740
741 There are quite a few [[mediawikiwiki:Help:Namespaces|special pages]] which act like variables to configure special wiki content and style. A big part of this wiki's style is configured in this section. We use Pywikibot to automate editing those pages.
742
743
744 '''Pywikibot Install'''
745
746 [[mediawikiwiki:Manual:Pywikibot/Installation|Manual:Pywikibot/Installation]]
747
748 <source lang="bash">
749 # get repo
750 if [[ ! -e ~/pywikibot/.git ]]; then
751 git clone --recursive \
752 https://gerrit.wikimedia.org/r/pywikibot/core.git ~/pywikibot
753 fi
754 cd ~/pywikibot
755 #updating
756 git pull --all
757 git submodule update
758 </source>
759
760
761 '''Pywikibot Configuration'''
762
763 Relevent docs: [[mediawikiwiki:Manual:Pywikibot/Use_on_non-WMF_wikis|Manual:Pywikibot/Use_on_non-WMF_wikis]], [[mediawikiwiki:Manual:Pywikibot/Quick_Start_Guide|Manual:Pywikibot/Quick_Start_Guide]]
764
765
766 <source lang="bash">
767 cd $HOME/pywikibot
768 dd of=user-config.py <<EOF
769 mylang = 'en'
770 usernames["$mwfamily"]['en'] = u'$wikiuser'
771 family = "$mwfamily"
772 console_encoding = 'utf-8'
773 password_file = "secretsfile"
774 EOF
775
776 dd of=secretsfile <<EOF
777 ("$wikiuser", "$wikipass")
778 EOF
779
780 # it won't overrwrite an existing file. Remove if if one exists
781 rm -f pywikibot/families/${mwfamily}_family.py
782 if isdeb; then
783 apt-get install -y python-requests
784 else
785 yum -y install python-requests
786 fi
787
788 python generate_family_file.py https://$mwdomain/wiki/Main_Page "$mwfamily"
789
790 # Note, this needed only for ssl site
791 tee -a pywikibot/families/${mwfamily}_family.py<<'EOF'
792 def protocol(self, code):
793 return 'https'
794 EOF
795 </source>
796
797
798 '''Pywikibot Script'''
799
800 This will take a full minute or so because the bot waits a few seconds between edits. Useful doc: [[mediawikiwiki:Pywikipediabot/Create_your_own_script]].
801
802 <source lang="bash">
803 cd "$HOME/pywikibot"
804
805 dd of=scripts/${mwfamily}_setup.py<<EOF
806 import pywikibot
807 import time
808 import sys
809 site = pywikibot.Site()
810 def x(p, t=""):
811 page = pywikibot.Page(site, p)
812 page.text = t
813 #force is for some anti-bot thing, not necessary in my testing, but might as well include it
814 page.save(force=True)
815
816 # Small/medium noncommercial wiki should be fine with no privacy policy
817 # based on https://www.mediawiki.org/wiki/Manual:Footer
818 x("MediaWiki:Privacy")
819
820 # licenses for uploads. Modified from the mediawiki's wiki
821 x("MediaWiki:Licenses", u"""* Same as this wiki's text (preferred)
822 ** CC BY-SA or GFDL| Creative Commons Attribution ShareAlike or GNU Free Documentation License
823 * Others:
824 ** Unknown_copyright|I don't know exactly
825 ** PD|PD: public domain
826 ** CC BY|Creative Commons Attribution
827 ** CC BY-SA|Creative Commons Attribution ShareAlike
828 ** GFDL|GFDL: GNU Free Documentation License
829 ** GPL|GPL: GNU General Public License
830 ** LGPL|LGPL: GNU Lesser General Public License""")
831 x("MediaWiki:Copyright", '$mw_license')
832 x("MediaWiki:Mainpage-description", "$mwdescription")
833
834
835
836 # The rest of the settings are for the site style
837
838 # Remove various clutter
839 x("MediaWiki:Lastmodifiedat")
840 x("MediaWiki:Disclaimers")
841 x("MediaWiki:Viewcount")
842 x("MediaWiki:Aboutsite")
843 # remove these lines from sidebar
844 # ** recentchanges-url|recentchanges
845 # ** randompage-url|randompage
846 # ** helppage|help
847 x("MediaWiki:Sidebar", """* navigation
848 ** mainpage|mainpage-description
849 * SEARCH
850 * TOOLBOX
851 * LANGUAGES""")
852
853 # remove side panel
854 # helpfull doc: https://www.mediawiki.org/wiki/Manual:Interface/Sidebar
855 x("mediawiki:Common.css", """/* adjust sidebar to just be home link and up top */
856 /* panel width increased to fit full wiki name. */
857 div#mw-panel { top: 10px; padding-top: 0em; width: 20em }
858 div#footer, #mw-head-base, div#content { margin-left: 1em; }
859 #left-navigation { margin-left: 1em; }
860
861
862 /* logo, and toolbar hidden */
863 #p-logo, #p-tb.portal {
864 display:none;
865 }
866
867 /* make the font size smaller for the misc stuff */
868 #p-personal {
869 font-size: 0.8em;
870 }
871
872 #footer-info {
873 font-size: 0.8em;
874 }
875 div#mw-content-text {
876 max-width: 720px;
877 }
878 """)
879 EOF
880
881 # this can spam a warning, so uniq it
882 python pwb.py ${mwfamily}_setup |& uniq
883 </source>
884
885
886 ''' Skippable Notes '''
887
888 The docs suggest manually entering the pass with python pwb.py login.py, then it should stay logged in. That didn't work for me, and anyways, we automation, so we use secrets file method.
889
890 Family name, and all its duplicattions documented as supposed to be $wgSitename, but it works fine using any name.
891
892 == Automatic Backups ==
893
894 Here we will have a daily cronjob where a backup host sshs to the mediawiki host, makes a backup then copies it back. Copy ~/mw_vars to the backup host at /root/mw_vars. Setup passwordless ssh from the backup host to the mediawiki host. Then run this code on the backup host. This will make a versioned backup of the wiki to ~/backup.
895
896 <source lang="bash" type="backup">
897 backup_script=/etc/cron.daily/mediawiki_backup
898 sudo dd of=$backup_script <<'EOFOUTER'
899 #!/bin/bash
900 # if we get an error, keep going but return it at the end
901 last_error=0
902 trap 'last_error=$?' ERR
903 source ~/mw_vars
904 # No strict because the host is likely not named the same as
905 # the domain.
906 ssh="ssh -oStrictHostKeyChecking=no"
907 logfile=/var/log/${mwdomain}_backup.log
908 {
909 echo "#### starting backup at $(date) ####"
910 $ssh root@$mwdomain <<ENDSSH
911 set -x
912 tee -a $mwc<<'EOF'
913 \$wgReadOnly = 'Dumping Database, Access will be restored shortly';
914 EOF
915 mkdir -p ~/wiki_backups
916 mysqldump -p$dbpass --default-character-set=binary my_wiki > ~/wiki_backups/wiki_db_backup
917 sed -i '\$ d' $mwc # delete read only setting
918 ENDSSH
919 # add no strict option to the defaults
920
921 rdiff() { rdiff-backup --remote-schema "$ssh -C %s rdiff-backup --server" "$@"; }
922 set -x
923 rdiff root@$mwdomain::/root/wiki_backups ~/backup/${mwdomain}_wiki_db_backup
924 rdiff root@$mwdomain::$mw ~/backup/${mwdomain}_wiki_file_backup
925 set +x
926 echo "=== ending backup at $(date) ===="
927 } &>>$logfile
928 if [[ $last_error != 0 ]]; then
929 echo "backup for $mwdomain failed. See $logfile"
930 fi
931 exit $last_error
932 EOFOUTER
933
934 sudo chmod +x $backup_script
935 </source>
936
937 '''Optional & requires additional steps'''
938
939 If you are like most people and don't use the old-school mail spool, setup the backup system to send mail externally so you are notified if it fails. For examples of how to do this, [http://unix.stackexchange.com/questions/36982/can-i-set-up-system-mail-to-use-an-external-smtp-server stackoverflow], [https://iankelling.org/git/?p=ian-specific/distro-setup;a=blob;f=mail-setup;hb=HEAD script I use].
940
941 == Restoring Backups ==
942
943 '''Whenever you implement a backup system, you should test that restoring the backup works.'''
944
945 You ''should'' be able to restore your wiki to a new machine by repeating all install steps, then restoring the database and the images directory. I've done this many times. However, we backup the entire Mediawiki directory in case you forget to record a step or some corner case happens. Since most people don't record the steps they took to setup Mediawiki, this is also the officially recommended method. In the code below we restore only the database and images folder from the full backup. You can try this after setting up a wiki from scratch. If it doesn't work, you know your fresh setup is not replicating your backed up wiki correctly. In that case, you can fall back to doing a full restore by copying the full directory instead of just the images. See [[mediawikiwiki:Manual:Restoring a wiki from backup]] if you run into any problems.
946
947 To test a backup restore:
948 # Do a backup of your wiki with some content in it, as described in the previous section
949 # Move your mediawiki install directory, or setup Mediawiki on a new machine
950 # Re-execute the mediawiki install steps
951 # Change REPLACE_ME in the code below (as in the backup section so you get the right variables),
952 # Execute the code on the backup machine.
953
954 '''Optional'''
955 <source lang="bash" type="example">
956 #!/bin/bash
957 source ~/mw_vars
958 restore="rdiff-backup --force -r now"
959 $restore ~/backup/${mwdomain}_wiki_file_backup /tmp/wiki_file_restore
960 $restore ~/backup/${mwdomain}_wiki_db_backup /tmp/wiki_db_restore
961 o=-oStrictHostKeyChecking=no
962 scp $o -r /tmp/wiki_file_restore/images/* root@$mwdomain:$mw/images
963 scp $o -r /tmp/wiki_db_restore root@$mwdomain:/tmp
964 ssh $o root@$mwdomain <<EOF
965 set -e
966 chmod -R g+w $mw/images
967 chgrp -R www-data $mw/images
968 mysql -u root -p$dbpass my_wiki < /tmp/wiki_db_restore/wiki_db_backup
969 php $mw/maintenance/update.php
970 EOF
971 </source>
972
973 Then browse to your wiki and see if everything appears to work.
974
975 == Updates ==
976
977 Subscribe to get release and security announcements [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki-announce].
978
979 For updates, we simply git pull all the repos, then run the maintenance script. This should be done after a backup. We recommend automatic updates to get security fixes and since not much is changing on the release branch. In this example, we update at 5 am daily (1 hour after the automatic backup example).
980
981 Major version upgrades should be done manually, and it is recommended to use a new installation directory and the same procedure as for backup & restore. Official reference: [[mediawikiwiki:Manual:Upgrading|Manual:Upgrading]]
982
983 Minor updates script:
984 <source lang="bash">
985 s=/etc/cron.daily/mediawiki_update
986 dd of=$s<<'EOF'
987 #!/bin/bash
988 source ~/mw_vars
989 cd $mw
990 for dir in extensions/* skins/* $mw; do
991 [[ -d $dir ]] || continue
992 cd $dir
993 branch=$(git describe --all)
994 branch=${branch#remotes/}
995 git fetch --all -q
996 new_head=$(git rev-parse $branch)
997 log=$(git log HEAD..$new_head)
998 if [[ $log ]]; then
999 pwd
1000 echo "$log"
1001 fi
1002 git checkout -q $new_head
1003 cd $mw
1004 done
1005 php $mw/maintenance/update.php -q --quick
1006 EOF
1007
1008 </source>
1009
1010 == Upgrading Major Versions ==
1011
1012 Reference documentation is at [[mediawikiwiki:Manual:Upgrading]]
1013
1014 My strategy is:
1015
1016 # Read the "Upgrade notices for MediaWiki administrators" on the upgrade version and any skipped versions at [[mediawikiwiki:Version_lifecycle]].
1017 # Setup a blank test wiki with the new version.
1018 # Backup the old database, restore it to the new wiki, run php maintenance/update.php.
1019 # If everything looks good, repeat and replace the old wiki with the new one.
1020
1021 == Stopping Spam ==
1022
1023 There is a balance between effective anti-spam measures and blocking/annoying contributors. Mediawiki documentation on how to combat spam, is not very good, but it has improved over time: [https://www.mediawiki.org/wiki/Manual:Combating_spam manual: Combating Spam]. It's possible for a spammer to quickly make thousands of edits, and there is no good documentation on purging lots of spam, so you should have a good strategy up front. My current strategy is 3 fold, and is limited to small/medium wiki's:
1024
1025 * Find new spam quickly, revert it & ban the user.
1026 ** Watch, and get notified of changes on all primary content pages: Special:Preferences, Bottom of the page, set an email address, then turn on "Email me also for minor edits of pages and files."
1027 ** Use a rss/atom feed reader, and subscribe to recent changes across the wiki. Newer browsers have an rss feed subscribe button, you can click after going to Special:RecentChanges. If that is not available, you can construct the proper url based on [https://meta.wikimedia.org/wiki/Help:Recent_changes#Web_feed these instructions].
1028 * Require registration to edit, and a custom captcha question on registration.
1029 * Install all non-user inhibiting anti-spam extensions / settings that take a reasonable amount of time to figure out.
1030
1031 == Choosing Extensions ==
1032
1033 Mediawiki.org has pages for ~5200 extensions. Mediawiki maintains ~700 extensions [http://git.wikimedia.org/tree/mediawiki%2Fextensions.git in it's git repo]. Wikipedia uses [https://en.wikipedia.org/wiki/Special:Version over 100 extensions]. Major distributors package [[mediawikiwiki:Comparison_of_extensions_in_distributions| ~36 extensions]]. We looked closely at the distributor's and briefly at the Mediawiki repo extensions. We haven't found any other useful list or recommendations.
1034
1035 Here are brief descriptions of extensions that are part of distributions and why they were rejected for this wiki.
1036
1037 {| class="wikitable"
1038 |+
1039 | '''InputBox''' || Add html forms to pages. Can't imagine using it. Would install if I did.
1040 |+
1041 | '''Pdfhandler''' || Gallery of pages from a pdf file. Can't imagine using it. Would install if I did.
1042 |+
1043 | '''Footnote''' || deprecated in newer versions
1044 |+
1045 | '''NewUserNotif''' || Send me a notification when a user registers. Seems like an excessive notification.
1046 |+
1047 | '''NewestPages''' || A page creation history that doesn't expire like recent-changes. Meh
1048 |+
1049 | '''RSSReader''' || Embed an rss feed. Can't imagine using it. Would install if I did.
1050 |+
1051 | '''Openid''' || Poor UI. 2 pages & 2 links <login> <login with openid> which is confusing & ugly.
1052 |+
1053 | '''Validator''' || dependency of of semantic
1054 |+
1055 | '''Semantic''' || Seems like a lot of trouble around analyzing kinds of data which my wiki will not have.
1056 |+
1057 | '''wikicalendar''' || Make a calendar of events etc. Can't imagine using it. Would install if I did.
1058 |}
1059
1060 == Misc Notes ==
1061
1062 ''' Web Analytics Software '''
1063
1064 I do not recommend using google analytics: it's proprietary software and gives private information of your website visitors to google for them to make money. Piwik has the best features and I recommend it, but I use goaccess because it is simpler to manage and good enough.
1065
1066 ''' Mediawiki Documentation Quality '''
1067
1068 Overall the documentation is good, but like wikipedia, it depends.
1069
1070 The closer a topic is to core functionality and commonly used features, the better the documentation is likely to be. Wikimedia Foundation (WMF) has a competing priority of being a good upstream to mediawiki users and being good for their own sites. That, plus the multitude of unconnected extension developers, and official documentation is sometimes neglected in favor of bug reports, readme files, comments, code, and unpublished knowledge. User's documentation edits vary in quality, and often aren't reviewed by anyone. If you run into an issue, try viewing/diffing the most recent version of a page by the last few editors.
1071
1072 One issue is that mediawiki.org needs a lot of organizing, deleting, and verifying of material, and that is relatively unpopular, tedious, and sometimes difficult work. The discussion pages of mediawiki.org are a wasteland of unanswered questions and outdated conversations, which is [https://www.mediawiki.org/wiki/Help:Talk_pages poor form] for a wiki. However, if you communicate well, you can get great help from their [https://www.mediawiki.org/wiki/Communication support forum, irc, and mailing list].
1073
1074
1075 '''Bash here documents, EOF vs 'EOF' '''
1076
1077 Here documents are used throughout this page, some people may not be aware of a small but important syntax. When the delimiter is quoted, as in <<'EOF', then the contents of the here document are exactly verbatim. Otherwise $ and ` are expanded as in bash, and must be escaped by prefixing them with \, which itself must then also be escaped to be used literally.
1078
1079
1080 ''' Mediawiki automation tools survey 7/2014 '''
1081
1082 Barely maintained:
1083 * https://github.com/ianweller/mw
1084 * http://search.cpan.org/~markj/WWW-Mediawiki-Client/bin/mvs
1085 * https://github.com/alexz-enwp/wikitools 3000 lines of code, no response to a bug reports in 2/2014
1086
1087 Getting basic maintenance
1088 * https://github.com/mwclient/mwclient 2000 lines of code
1089
1090 Actively developed, used by wikimedia foundation a lot.
1091 * [[mediawikiwiki:Manual:Pywikibot]]
1092
1093
1094 ''' Troubleshooting Errors '''
1095
1096 If mediawiki fails to load, or shows an error in the browser, enable some settings and it will print much more useful information. [[mediawikiwiki:Manual:How to debug]]
1097
1098 ''' License '''
1099
1100 This page and this wiki is licensed under cc-by-sa 4.0.
1101 This means the code is compatible with gplv3.
1102
1103 == todo list for this page ==
1104
1105 * Check if there are any new default extensions 1.28 which I haven't evaluated.
1106 * Test for any new config values set by the 1.28 gui install method.
1107 * Get Visual editor extension.
1108 * Don't require registration for edits