Difference between revisions of "Marspedia:Upgrading Mediawiki"

From Marspedia
Jump to: navigation, search
(Created page with "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 Jun...")
 
Line 4: Line 4:
  
  
## Set up your environment
+
==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 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.
Line 13: Line 13:
  
  
## Backup everything
+
==Backup everything==
  
 
* Login to our VPS using SSH:
 
* Login to our VPS using SSH:
Line 42: Line 42:
  
  
## Prepping the new install
+
==Prepping the new install==
  
 
* Download the latest version of Mediawiki from their site.
 
* Download the latest version of Mediawiki from their site.
Line 52: Line 52:
  
 
* Put all of the files into a new directory such as ~/marspedia.org.new
 
* Put all of the files into a new directory such as ~/marspedia.org.new
 
 
##
 

Revision as of 13:40, 18 June 2018

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