Difference between revisions of "Marspedia:Upgrading Mediawiki"

From Marspedia
Jump to: navigation, search
 
(2 intermediate revisions by the same user not shown)
Line 70: Line 70:
 
**[https://www.mediawiki.org/wiki/Extension:ConfirmAccount ConfirmAccount]
 
**[https://www.mediawiki.org/wiki/Extension:ConfirmAccount ConfirmAccount]
 
**[https://www.mediawiki.org/wiki/Extension:CheckUser CheckUser]
 
**[https://www.mediawiki.org/wiki/Extension:CheckUser CheckUser]
 +
**[https://www.mediawiki.org/wiki/Extension:Google_Analytics_Integration googleAnalytics]
 
**[https://www.mediawiki.org/wiki/Extension:Math Math]
 
**[https://www.mediawiki.org/wiki/Extension:Math Math]
**[https://www.mediawiki.org/wiki/Extension:Nuke Nuke]
 
 
**[https://www.mediawiki.org/wiki/Extension:OpenGraphMeta OpenGraphMeta]
 
**[https://www.mediawiki.org/wiki/Extension:OpenGraphMeta OpenGraphMeta]
 
**[https://www.mediawiki.org/wiki/Extension:PageCreationNotif Page Creation Notification]
 
**[https://www.mediawiki.org/wiki/Extension:PageCreationNotif Page Creation Notification]
Line 80: Line 80:
  
  
*Copy in the Metrolook and Marspedia skin directories.  (The Marspedia skin is no longer used but holds some asset files which we reference.)
+
*Copy in the Metrolook, Marspedia and common skin directories.  (The Marspedia skin is no longer used but holds some asset files which we reference.)
  
  

Latest revision as of 07:26, 2 July 2020

Below are the exact procedures for making upgrades to Marspedia's software, which is based on the Mediawiki software package.

This guide was written in June 2018 by James Burk.


Set up your environment

  • You will need to use a tool that can SSH into our shell account. On Windows 10, I use Windows Subsystem for Linux and am able to run Ubuntu and all of its command line tools natively. For older versions of Windows, you can install Putty or other tools like MingW or Cygwin.
  • You will need to have several gigabytes of space available on your machine to hold the backups.
  • It's also easy to use an FTP client like Filezilla to do the filesystem backups, but you could also use rsync on the command line.


Backup everything

  • Login to our VPS using SSH:
 $ ssh mfmarspedia@marspedia.org


  • Change into the database backup directory
 $ cd backup_db


  • Our server is set to automatically backup the DB every day. However, you can confirm that it's running ok by listing the contents of this directory and confirming all files are larger than 0.
 $ ls -la


  • If you need to run a manual backup, this is the command to back up the database. Be sure to put in the real password and the real date at the end of the filename (at end of command).
 $ mysql -h mysql.marspedia.org -u marspediaorg_www -pPASSWORD_GOES_HERE marspediaorg_www > backup_marspediaorg_www_YYYYMMDD.sql


  • Backup all of the files in ~/marspedia.org

I use Filezilla to do this, copying the entire tree onto my laptop. The most important ones are LocalSettings.php, Env-LocalSettings.php, and the entire /images directory. Those will be needed on the upgraded install.

If you use Filezilla, be sure to use S/FTP (port 22) just to be safe.


Prepping the new install

  • Download the latest version of Mediawiki from their site.
  • Unzip the files

I often do these two steps on the server itself, but you can do it locally then copy up to the server using S/FTP.


  • Put all of the files into a new directory such as ~/marspedia.org.new


  • Copy in the LocalSettings.php and Env-LocalSettings.php files which include our configurations including database location & credentials.


  • Copy in the .htaccess file which powers our short URLs and forces SSL mode.


  • Copy in our favicon.* files in the root.


  • Copy in the entire /images directory.



  • Copy in the Metrolook, Marspedia and common skin directories. (The Marspedia skin is no longer used but holds some asset files which we reference.)


  • Copy in any other customizations or custom Extensions we have. (As of this writing we are working on a "Category Picker" which will be a fork of the one in VisualEditor)
  • For the Metrolook theme, be sure to copy in the customized theme.less file which is in /skins/Metrolook/components/custom


Deploying the new Install

  • Rename the current webroot from ~/marspedia.org to ~/marspedia.org.old
  • Rename the new webroot from ~/marspedia.org.new to ~/marspedia.org
  • Run the DB Update script using these commands:
 $ cd ~/marspedia.org/maintenance
 $ php update.php


Installing Parsoid

Parsoid is a Node.js service that enables the VisualEditor. Pay attention to the versions of Parsoid and VisualEditor as one may require the other.

The version we have running on Heroku was cloned on June 24, 2018. It should be good for awhile. We are using that instance for Marspedia, Lunarpedia, and Spacepedia.

Here's the install instructions Parsoid on Heroku:

Install Parsoid on a shared host

Troubleshooting Problems

Here's Mediawiki's Guide to Upgrade