Rogerhc
- mediawiki-l, the MediaWiki mailing list.
- #mediawiki connect - the IRC channel.
- Support desk
Rogerhc | talk | talk archive
Hi! I'm Roger. I move slowly so the bird doesn't see me.
Here are my MediaWiki bookmarks and notes
☐ 🐛 ☑
֎ ☃ 😃 🙇 🙈 😴 🌸 🐝 🏵 🌻 🎓
- DB <-the magic
- the dark magic ->> https://doc.wikimedia.org/mediawiki-core/master/php/index.html
- the light magic ..> https://doc.wikimedia.org/
Advertising
edit- https://www.guyrutenberg.com/2014/10/13/displaying-google-adsense-in-mediawiki/ -- guyrutenberg's LocalSettings snip for Google Adsense ads
- Manual:Hooks
Bot notes
editOut of date?
- Extension:MassEditRegex (beta) -- an alternative to Pywikipediabot?
- Manual:Pywikipediabot/Basic_use
- Use on non-WMF wikis
- Download from http://toolserver.org/~pywikipedia/nightly/ or see http://pywikipediabot.sourceforge.net/
- Pywikipediabot was recommended for editing category names, at Stack Overflow with a note to:
- (Check catlib.py for the category manipulation code, and category.py for an end-user-friendly mass category modification bot.)
Sysadmin Notes
editUpgrading MediaWiki, backups, changing webhosts, etc.
- Manual:Configuration settings
- Manual:Using custom namespaces
- Manual:$wgAllowSpecialInclusion
- Manual:$wgNamespacesToBeSearchedDefault
MariaDB / MySQL
edit- Intro -- https://mariadb.com/kb/en/introduction-to-relational-databases/
- Basics -- https://mariadb.com/kb/en/a-mariadb-primer/#the-basics-of-a-database
- Useful queries -- https://mariadb.com/kb/en/useful-mariadb-queries/
Maintenance
edit- Manual:update.php clears objectcache table, among other things
- Manual:Reduce size of the database -> Manual:Reduce_size_of_the_database#Compress_old_revisions <- check database size (roger_tp 367.98 MB), run this (done), check database size (____). May take cPanel a while to update the size list.
Upgrade
editSSL self-cert test wiki
edit- /Create SSL self-cert in cPanel -- how I create free self-authenticated SSL certificate for my test wiki
DefaultSettings.php
editincludes/DefaultSettings.php --Don't edit--copy stuff to LocalSettings.php and modify there instead
Manual:Configuring file uploads
Manual:Configuring_file_uploads#Set_maximum_size_for_file_uploads
$wgMaxUploadSize = 1024*1024*100; # 100MB --default if not overridden by lower php.ini default of 2MB or 8MB (See above link)
auto-confirmed users (timestamp: 2020 MW 1.31)
editManual:$wgAutoConfirmAge -- default is 0; so set it to something
Manual:$wgAutoConfirmCount -- default is 0; so set it to something
Manual:DefaultSettings.php --Don't edit--copy stuff to LocalSettings.php and modify there instead
Default (snip from DefaultSettings.php):
// Implicit group for all logged-in accounts $wgGroupPermissions['user']['move'] = true; $wgGroupPermissions['user']['move-subpages'] = true; $wgGroupPermissions['user']['move-rootuserpages'] = true; // can move root userpages $wgGroupPermissions['user']['move-categorypages'] = true; $wgGroupPermissions['user']['movefile'] = true; $wgGroupPermissions['user']['read'] = true; $wgGroupPermissions['user']['edit'] = true; $wgGroupPermissions['user']['createpage'] = true; $wgGroupPermissions['user']['createtalk'] = true; $wgGroupPermissions['user']['writeapi'] = true; $wgGroupPermissions['user']['upload'] = true; $wgGroupPermissions['user']['reupload'] = true; $wgGroupPermissions['user']['reupload-shared'] = true; $wgGroupPermissions['user']['minoredit'] = true; $wgGroupPermissions['user']['editmyusercss'] = true; $wgGroupPermissions['user']['editmyuserjson'] = true; $wgGroupPermissions['user']['editmyuserjs'] = true; $wgGroupPermissions['user']['purge'] = true; $wgGroupPermissions['user']['sendemail'] = true; $wgGroupPermissions['user']['applychangetags'] = true; $wgGroupPermissions['user']['changetags'] = true; $wgGroupPermissions['user']['editcontentmodel'] = true; // Implicit group for accounts that pass $wgAutoConfirmAge $wgGroupPermissions['autoconfirmed']['autoconfirmed'] = true; $wgGroupPermissions['autoconfirmed']['editsemiprotected'] = true;
Customize in LocalSettings.php: 1. take away (set to false) move rights for group 'user', 2. give those instead to group 'autoconfirmed', 3. Set $wgAutoConfirmAge AND $wgAutoConfirmCount:
// Implicit group for all logged-in accounts $wgGroupPermissions['user']['move'] = false; $wgGroupPermissions['user']['move-subpages'] = false; $wgGroupPermissions['user']['move-rootuserpages'] = false; $wgGroupPermissions['user']['move-categorypages'] = false; $wgGroupPermissions['user']['movefile'] = false; // Implicit group for accounts that pass $wgAutoConfirmAge AND $wgAutoConfirmCount $wgGroupPermissions['autoconfirmed']['autoconfirmed'] = true; $wgGroupPermissions['autoconfirmed']['editsemiprotected'] = true; $wgGroupPermissions['autoconfirmed']['move'] = true; $wgGroupPermissions['autoconfirmed']['move-subpages'] = true; $wgGroupPermissions['autoconfirmed']['move-rootuserpages'] = true; // can move root userpages $wgGroupPermissions['autoconfirmed']['move-categorypages'] = true; $wgGroupPermissions['autoconfirmed']['movefile'] = true; // Seconds since 'user' account created $wgAutoConfirmAge = 86400*2; // two days // Edit count $wgAutoConfirmCount = 2; // two edits
Pages
edit- Compatibility -- PHP and Database requirements charts
Short URL
edit- Manual:Short_URL -- Overview
- Manual:Short URL/Apache -- Apache
- https://shorturls.redwerks.org/ -- This configuration tool WORKS for MW1.35.1!
Apache
edit- https://httpd.apache.org/docs/2.4/rewrite/intro.html -- Apache mod_rewrite intro
- https://httpd.apache.org/docs/current/mod/mod_rewrite.html -- Apache mod_rewrite doc
- https://httpd.apache.org/docs/current/expr.html#vars -- %{REQUEST_FILENAME} -- the values of the named HTTP request headers.
Testing
editSubpage titles
editSubpage titles, initial /Subpage letter is case sensitive.
Subpage links
editFancy subpage links:
need work
editManual
edit- Manual:Using_custom_namespaces#Removing_custom_namespaces
- Manual:Backing up a wiki
- Category:Manual
- Manual:Skins
- Manual:Start
- Manual:Contents
- Manual:Combating_spam -- Rob Church started this page 4/30/2007
- Manual:$wgSpamRegex
Help
edit- m:Help:Calculation
- Help:Extension:ParserFunctions
- Help:Magic_words
- Help:Start
- Help:Contents
- Help:Tables - User:Rogerhc/Tables 2 col