Website application upgrades

From Gramps
Jump to: navigation, search
Gnome-important.png
Notes for the webmaster@gramps-project.org

Used in the maintenance of the Gramps website

Upgrade Mantis Bug Tracker (bug tracker)

MantisBT is an open source issue tracker.

Current installed version 2.4.1 (released: 2017-05-20)

  • Place MantisBT into readonly mode using the file mantis_offline.php to prevent users from using the system while the upgrade is in progress.
  • Backup gramps_bugs mysql database using phpMyAdmin from the CPanel interface using the SQL format.
    • Note that mantis attachments are stored in the /home/gramps/public_html/files folder.
  • Download latest version of MantisBT ( https://github.com/mantisbt/mantisbt/releases ) - (Use the ".tar.gz" file.)
  • Upload the MantisBT ".tar.gz" file into the Gramps hosting site either using ftp or the CPanel "File Manager".
  • Use the CPanel "File Manager" to unarchive into /home/gramps/ - it will create a new folder such as "mantisbt-release-2.10.0"
  • Rename the new folder from such as "mantisbt-release-2.10.0" to "bugsnew"
  • Copy "config_inc.php" from the old folder into the new folder (the "config_inc.php" file is located in the "config" directory.)
  • Copy the "phpmailer" folder from the "library" folder from the old "bugs" into the new folder "bugsnew/library"
    • Failing to to do this step will result in an unhelpful blank html page! Currently using PhpMailerAutoload v5.2.22 (20170105) check mantisbt readme if this needs to be upgraded. If so download from github.
  • Check any readme type files to make sure there are not any database schema changes required - and follow the directions if there are...
    • Then check the install by using: "/mantisbt/admin/check/index.php"
    • And then upgrade the installation using: "/mantisbt/admin/install.php"
  • Rename the original folder from "bugs" to "bugsold"
  • Rename the new folder from "bugsnew" to "bugs"

Update the MantisBT plugins by downloading the updated version and install them (check the readme and follow any instructions)


See if it works!

  • Place MantisBT into normal mode by removing mantis_offline.php
  • Login as a user
    • Use the test user (see offline support document)
  • Test a few things (Edit note/create feature/issue)
  • Look at the bottom left corner of the main overview page where it will display the current upgraded to version number so you know you are looking at the new install (You may need to refresh to get a new copy, as there is probably some caching involved...)

If not immediately functional

  • Revert by renaming "bugs" to "bugsnew" and "bugsold" to "bugs"
  • If any database schema changes had been made restore the original "gramps_bugs.sql" mysql database using phpMyAdmin.

that should put MantisBT back to square one...


Otherwise if it worked.

  • Remove the "admin" folder (Or else there is a warning each time you login to do this).
  • Remove the MantisBT ".tar.gz" file you uploaded.
  • Move the "bugsold" folder to /home/gramps/ to prevent access.
  • After a two weeks, remove the "bugsold" folder.

Final required modifications to MantisBT source code so that the "Gramps > Product Version" is required by default when raising bug reports:

function validate( $p_update_extended =  true)

and add this in just below (check braces are balanced):

 {

 if($this->project_id !== 3) {
         if( is_blank( $this->version ) ) {
 			error_parameters( lang_get( 'version' ) );
 			trigger_error( ERROR_EMPTY_FIELD, ERROR );
 		}
 }


  • In bug_report_page.php added line to make the red * (Asterisk character) show after the "Gramps > Product Version" change:


<?php echo lang_get( 'product_version' ) ?>
To read:
<?php echo '*' . lang_get( 'product_version' ) ?>


Also check that the following two links work and are not blank:

  • Changelog page
  • Roadmap.

If they are follow the instructions in the offline support document.


Backup the website!

Upgrade MediaWiki (wiki)

MediaWiki is a free software open source wiki package written in PHP, originally for use on Wikipedia.

Current installed version 1.28.2 (released: 2017-04-30)

The gramps_wiki mysql database is quite a large, and MediaWiki upgrades are generally more likely to have problems when upgrading than other actions on the Gramps website!

  • Place MediaWiki into restricted editing mode (See "LocalSettings.php" and uncomment the relevant section)
  • Using the Gramps Cpanel interface go to the MySQL section, then select "phpMyAdmin" and remove the often large cache tables of gramps_wiki ( "l10n_cache" and "objectcache" ).
  • Backup gramps_wiki mysql database using phpMyAdmin from the CPanel interface using the SQL format.
    • If this does not work due to timeouts on Godaddy try using SSH and the mysql command or even phpMyAdmin to clone/copy the existing database.
  • Download latest version of MediaWiki ( https://www.mediawiki.org/wiki/Download ) - (Use the ".tar.gz" file.)
  • Upload the MediaWiki ".tar.gz" file into the Gramps hosting site either using ftp or the CPanel "File Manager".
  • Use the CPanel "File Manager" to unarchive it into / - it will create a new folder such as "mediawiki-1.30.0"

From here, you can use a combination of the Cpanel "File Manager" or ssh, so long as you get it all done!

  • Rename the new folder from such as "mediawiki-1.30.0" to "wikinew"
  • Copy the "LocalSettings.php" file from "wiki" to "wikinew" folder.
  • Copy the entire "images" folder (quite large - nearly 1.7GB) from "wiki" to "wikinew" - you will be replacing an existing folder in wikinew. Again, you could do this with the filemanager or use ssh if you are comfortable with it). Even using ssh it takes quite a while, and I'm pretty sure it puts a load on the server...
  • Copy folders from the "extensions" folder in "wiki" into "wikinew". Copy only the ones that do not exist there (that is, don't overwrite folders in the extensions directory with older versions - only copy across the ones that are not already there). We use the extensions listed below that do not come with the base install as well as a few alos listed from the base install that you should not copy over. You need to check and see if there are new versions of these, as sometimes the original versions will not work with the new version of MediaWiki. Installed extensions are listed on the following page: https://gramps-project.org/wiki/index.php?title=Special:Version
    • Extension that Gramps wiki uses that come with MediaWiki (do not need to be installed) but are listed in the LocalSettings.php file
      • ParserFunctions 1.6.0 - Enhance parser with logical functions
      • TitleBlacklist 1.5.0 -
    • Thirdparty Extensions
      • Collection - (v1.7.0 RE1_30) - Create pdf books from wiki pages Disabled due to server load issues!
      • Confirm User Accounts - (- 21.21 : 25 October 2016) – Gives bureaucrats the ability to confirm account requests
      • UserMerge - (v1.10.1 RE1_30) - Merges references from one user to another user in the wiki database - will also delete old users following merge. Requires usermerge privileges
      • LabeledSectionTransclusion - (- 4.52 : 1 September 2017) -
      • Variables - (v2.2.0 RE1_30) - Parser functions allowing to work with dynamic variables in an article scoped context
      • Google Analytics Integration - (v3.0.1 : 14 August 2017 RE1_30) -

If there are any database schema changes, you may need to run the "update.php" file that is in the MediaWiki maintenance directory.

  • Do that by using ssh (see offline support document) and changing to the "wiki/maintenance" directory and run php update.php

There may be some warnings about deprecated functions and the option to bail out - you should be able to continue to do the schema upgrade... If it were to fail, you'll need to revert to the original files (by renaming the folders) and probably do a database restore to the unchanged version of the gramps_wiki SQL file. Just hope it doesn't happen to you!

  • Rename the original folder from "wiki" to "wikiold"
  • Rename the new folder from "wikinew" to "wiki"

Otherwise if it worked.

  • Place MediaWiki into normal mode
  • Check the upgraded MediaWiki version details and all extensions are updated:

https://gramps-project.org/wiki/index.php?title=Special:Version

  • Remove the MediaWiki ".tar.gz" file you uploaded.
  • For the "wikiold" folder add a webprotect in the .Htaccess file to stop access to the old MediaWiki version (especially important if database schema update occurred)
  • After a two weeks, remove the "wikiold" folder.

Skins (Themes)

  • Default is "Vector" as it has been customised for Gramps

Backup the website.

Upgrade WordPress (blog)

WordPress is open source software used to create the blog.

Current installed version 4.9.8 (released: 2018-08-02)

The Dashboard will indicated to you if there is a newer version available for updating/upgrading.

You can expect pretty good results by just:

  • Clicking on the appropriate "Update to x.x.x" button to upgrade the main install.

After the update return to the Dashboard, Upgrades screen and

  • Upgrade any plugins (after checking the compatibility notes for each) the following plugins are used on Gramps blog:
    • Akismet Anti-Spam
    • Autoptimize
    • Manage Notification Emails 1.3.0(Virgial)
    • Easy HTTPS (SSL) Redirection
    • Google Captcha (reCAPTCHA) by BestWebSoft
    • PHP Compatibility Checker
    • WordPress HTTPS
    • WP-Optimize

Themes

  • Do not update the Gramps Theme named "Hello Gramps!" as it has been customised by Jason Simanek (Unless you know how)
  • Upgrade only the themes that come with WordPress

Backup the website.

Announcement of upgrade email template

  • See the source for this wiki page (embedded as a comment).

See also