Wiki Admin

From Minetest
(Redirected from Wiki Setup)



Introduction

This page discusses setup and maintenance issues related to this MediaWiki. It doesn't include instructions to install from scratch yet.

Common Wiki admin issues 

Related notes:

  • If you edit the CSS code, you and other visitors will need to clear browser cache before the changes will be visible. This may be true for some JS changes as well.
  • No extension is needed to add StatCounter support. Instead, to add such support, one puts an appropriate block of JS code at the bottom of the Common.js page.

Changes relative to base

The mid-2023 iteration of this wiki was based initially on MediaWiki 1.38.7. The distribution tarball used, which may no longer exist at the original link, was:

https://releases.wikimedia.org/mediawiki/1.38/mediawiki-1.38.7.tar.gz

As of early September 2023, three files in the Timeless skin code had been modified. Those changes are described at this link.

No other changes to existing files had been made that needed to be kept.

A number of new files had been added. The additions may be summarized as follows:

  • LocalSettings.php
  • a site logo image
  • a site wordmark image
  • images imported using a maintenance script
  • a subdirectory "admin/" for admin notes and files
  • a subdirectory "misc/" for misc. public files

Some configuration pages had been modified [in the GUI and MariaDB database] as well. Partial list for that:

  • Skins CSS pages
  • Sidebar

Key settings in LocalSettings.php 

This is a partial list of site-specific settings that were used in "LocalSettings.php" as of September 2023:

 $wgSitename    = "Minetest";
 $wgServer      = "https://wiki.minetest.org";
 $wgEnableEmail = false;
 
 $wgLogos = [
     '1x'       => "fmlogo.png" ,
     'icon'     => "fmlogo.png" ,
     'wordmark' => [
         'src' => 'fmwordmark-text.png' ,
         'alt' => 'Final Minetest wordmark' ,
     ] ,
 ];
 
 $wgDBtype     = "mysql";
 $wgDBserver   = "localhost";
 $wgDBname     = "mediawiki";
 $wgDBuser     = "mediawiki";
 $wgDBpassword = "(a password)";
 $wgDBprefix   = "mw_";
 
 $wgEnableUploads = false;
 $wgPingback      = false;
 $wgLocaltimezone = "America/Los_Angeles";
 $wgDefaultSkin   = "timeless";
 
 wfLoadSkin( 'MonoBook' );
 wfLoadSkin( 'Timeless' );
 wfLoadSkin( 'Vector'   );
 
 wfLoadExtension( 'WikiEditor'  );
 wfLoadExtension( 'Cite'        );
 wfLoadExtension( 'Scribunto'   );
 
 wfLoadExtension( 'ParserFunctions'       );
 wfLoadExtension( 'SyntaxHighlight_GeSHi' );

Note: The 'alt' feature used above depended on the patches at this link.

How one update was done 

The wiki was updated from 1.38.7 to 1.39.4 in early September 2023. The distribution tarball used, which may no longer exist at the original link, was:

https://releases.wikimedia.org/mediawiki/1.39/mediawiki-1.39.4.tar.gz

The following procedure was used:

1. Back-up the MS-SQL database. Important: This step is essential because MediaWiki updates are one-way in this context.

2. Execute commands similar to the following with paths modified appropriately:

 rm -fr                     mediawiki-1.39.4
 tar zxf         /somewhere/mediawiki-1.39.4.tar.gz
 chown -R www-data.www-data mediawiki-1.39.4
 cd                         mediawiki-1.39.4
 
 rm -fr images # Empty except for a README
 cp -a /somewhere/oldwiki/LocalSettings.php   .
 cp -a /somewhere/oldwiki/{admin,misc,images} .
 cp -a /somewhere/oldwiki/*.png .

3. Move the old wiki tree out of the way, move the new wiki tree to the appropriate pathname, go to the top directory of the new wiki tree after moving it, and execute:

 cd maintenance
 php update.php

4. Apply the patches at this link.

5. Clear your browser cache.

6. If you'd added any extensions to the old wiki, at this point, you'd install updated copies.

Issues with MediaWiki 1.40.X  

If this MediaWiki hasn't already been updated to the 1.40.X series, be aware of the following issues with that series:

1. An "nginx" config change may be needed. Specifically, the following line should be added, if it isn't already present, to the appropriate "server { ... }" block in the appropriate domain configuration file:

add_header X-Content-Type-Options nosniff;

Note: This change has already been made on the web server used but may need to be re-made if things change.

2. Minimum password length has been increased.

3. Maintenance scripts should now be executed using commands of the form "php run.php update" as opposed to "php update.php".