Difference between revisions of "Website application upgrades"

From Gramps
Jump to: navigation, search
m (Upgrade WordPress (blog): upgrade wordpress)
 
(75 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{man warn|Notes for the [email protected]|Used in the maintenance of the Gramps website.}}
 
= Upgrade Mantis Bug Tracker (bug tracker) =
 
= Upgrade Mantis Bug Tracker (bug tracker) =
  
Backup grampsbugs mysql database using the CPanel interface.
+
<code>https://gramps-project.org/bugs/</code>
  
Download latest version of Mantis - I use the .tar.gz file.
+
[https://www.mantisbt.org/ MantisBT] is an open source issue tracker.
  
Upload the .tar.gz file into the Gramps hosting either ftp or using the CPanel file manager.
+
[https://gramps-project.org/bugs/my_view_page.php Current installed version] 2.22.1 (released: 2019-09-27)
  
Use the CPanel file manager to unarchive it into / - it will create a new folder such as mantisbt-1.2.14.
+
* Place MantisBT into [https://www.mantisbt.org/docs/master/en-US/Admin_Guide/html/admin.install.upgrade.html readonly mode] using the file <code>mantis_offline.php</code> 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 <code>/home/gramps/public_html/files</code> 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 <code>/home/gramps/</code> - 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.)
 +
* 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"
 +
<hr>
 +
Update the MantisBT plugins by downloading the updated version and install them (check the readme and follow any instructions)
 +
* Source control integration plugin framework for MantisBT, including support for Github ( https://github.com/mantisbt-plugins/source-integration ) 2 part plugin (Get the master branch)[https://mantisbt.org/bugs/view.php?id=21201]
 +
** Source control integration (version 2.3.0)
 +
** Source Github integration (version 2.1.0)
 +
* Google Analytics integration for MantisBT (version 2.0)( https://github.com/mantisbt-plugins/google-analytics )
 +
<hr>
 +
See if it works!
 +
* Place MantisBT into normal mode  by removing <code>mantis_offline.php</code>
 +
* 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...)
 +
<hr>
 +
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...
 +
<hr>
 +
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 <code>/home/gramps/</code> to prevent access.
 +
* After a two weeks, remove the "bugsold" folder.
 +
<hr>
 +
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.
 +
<hr>
 +
'''Backup the website!'''
  
Rename the new folder from such as mantisbt.1.2.14 to bugsnew.
+
= Upgrade MediaWiki (wiki) =
  
Copy config_inc.php from the old folder into the new folder - that file in the last version is now in the config directory rather than root as previously.
+
<code>https://gramps-project.org/wiki/</code>
  
Check any readme type files to make sure there are not any database schema changes required - and follow the directions if there are...
+
[https://www.mediawiki.org/wiki/MediaWiki MediaWiki] is a free software open source wiki package written in PHP, originally for use on Wikipedia.
  
Rename the original folder from bugs to bugsold.
+
[https://gramps-project.org/wiki/index.php?title=Special:Version Current installed version] [https://www.mediawiki.org/wiki/MediaWiki_1.31 1.31.3] (released: 2019-07-02) LTS (Supported until [https://www.mediawiki.org/wiki/Version_lifecycle#Versions_and_their_end-of-life June 2021])
  
Rename the new folder from bugsnew to bugs.
+
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!
  
See if it works!  Login as a user and test a few things.
+
* 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 a timeout occurs 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 <code>/</code> - it will create a new folder such as "mediawiki-1.31.3"
  
Look to the bottom left corner of the screen where it will display the current 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...)
+
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.31.3" to "wikinew"
 +
* Copy the "LocalSettings.php" file from "wiki" to "wikinew" folder.
 +
* Copy the entire "images" folder (quite large - nearly 1.9GB) 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 also 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 - Enhance parser with logical functions
 +
** Thirdparty Extensions
 +
*** Confirm User Accounts – Gives bureaucrats the ability to confirm account requests
 +
*** LabeledSectionTransclusion
 +
*** Variables - Parser functions allowing to work with dynamic variables in an article scoped context
 +
*** Google Analytics Integration
 +
** [https://www.mediawiki.org/wiki/Manual:Skins Mediawiki:Skins](Themes)
 +
*** Default is "Vector" as it has been customised for Gramps ( see https://gramps-project.org/wiki/index.php/MediaWiki:Common.css )
 +
*** MobileFrontEnd
 +
**** "MinervaNeue" mobile Skin (which is the same one used on Wikipedia)
  
If not immediately functional, revert by renaming bugs to bugsnew and bugsold to bugs - that should put it back to square one...
+
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 <code>php update.php</code>
 +
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!
  
Remove the admin folder (there is a warning first time you login as an admin to do this).
+
* Rename the original folder from "wiki" to "wikiold"
 +
* Rename the new folder from "wikinew" to "wiki"
  
Remove the .tar.gz file you uploaded.
+
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.
  
After a week or two, remove bugsold.
 
  
Modifications so product version is required:
+
'''Backup the website.'''
  
In core/bug_api.php added this in just below:
+
= Upgrade WordPress (blog) =
<pre>
 
function validate( $p_update_extended = true) {
 
  
if($this->project_id !== 3) {
+
<code>https://gramps-project.org/blog/</code>
        if( is_blank( $this->version ) ) {
 
error_parameters( lang_get( 'version' ) );
 
trigger_error( ERROR_EMPTY_FIELD, ERROR );
 
}
 
}
 
</pre>
 
  
 +
[https://wordpress.org/ WordPress] is open source software used to create the blog.
  
In bug_report_page.php added line to make the red *
+
Current installed version 5.8.1 ([https://wordpress.org/download/releases/ released:] 2021-09-09)
           
 
Change:           
 
            <?php echo lang_get( 'product_version' ) ?>           
 
To read:
 
            <?php echo '<span class="required">*</span>' . lang_get( 'product_version' ) ?>
 
  
= Upgrade Media Wiki (wiki) =
+
* Backup gramps_blog mysql database using phpMyAdmin from the CPanel interface using the SQL format.
 +
* Login to the Gramps blog ( https://gramps-project.org/blog/wp-login.php ) using an admin login.
  
grampswiki is quite a large database, and Media Wiki upgrades are generally more likely to have problems than other actions in Gramps!
+
The Dashboard will indicated to you if there is a newer version available for updating/upgrading.
  
Use the Gramps interface (MySQL, then phpMySQL) to remove the often large cache tables of grampswiki (l10n_cache and objectcache).
+
You can expect pretty good results by just:
 +
* Clicking on the appropriate "Update to x.x.x" button to upgrade the main install.
  
Backup grampswiki using the CPanel interface.
+
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 (Virgial)
 +
** Easy HTTPS (SSL) Redirection
 +
** Google Captcha (reCAPTCHA) by BestWebSoft
 +
** PHP Compatibility Checker
 +
** WordPress HTTPS
 +
** WP-Optimize
  
Download the latest version of Media Wiki - I use the .tar.gz file.
+
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
  
Upload the .tar.gz file into the Gramps hosting.
+
'''Backup the website.'''
  
Use the CPanel file manager to unarchive it into / - it will create a new folder such as mediawiki-1.20.2.
+
=Announcement of upgrade email template =
 +
* See the source for this wiki page (embedded as a comment).
 +
<!--
 +
To: gramps mailing list
 +
 +
Subject line:
  
From here, you can use a combination of the file manager or ssh, so long as you get it all done!
+
Body of email:
  
Rename the new folder from such as mediawiki-1.20.2 to wikinew.
+
-->
 +
=Changing to a new Hosting service=
 +
{{stub}}
 +
General summary of steps taken on move to current host.
  
Copy the LocalSettings.php file from wiki to wikinew.
+
=See also=
 
 
Copy the entire images folder (quite large - nearly 800MB) 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 about 5 or 6 extensions that do not come with the base install.  As at November 2014, they are ConfirmAccount, LabeledSectionTransclusion, SearchFeed, Variables, Vector - you may even need to see if there are new versions of these, as sometimes the original versions will not work with the new version of MediaWiki.
 
 
 
Rename the original folder from wiki to wikiold.
 
 
 
Rename the new folder from wikinew to wiki.
 
 
 
If there were database schema changes, you may need to run the update.php file that is in the maintenance directory.  Do that by using ssh and changing to the directory and run "php update.php".  There will 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.  Just hope it doesn't happen to you!
 
 
 
Remove the .tar.gz file you uploaded.
 
 
 
After a week or two, remove wikiold.
 
 
 
 
 
==See also==
 
*[[UpgradeMediaWiki]]
 
 
*[[.dtd_and_.rng]]
 
*[[.dtd_and_.rng]]
 
*[[Rollover for the manual]]
 
*[[Rollover for the manual]]
 
= Upgrade Word Press (blog) =
 
 
Backup grampsblog mysql database using the CPanel interface.
 
 
Login to the blog using an admin login.
 
 
The Dashboard will tell you if there is a newer version available for upgrading.
 
 
You can expect pretty good results by just clicking on the appropriate upgrade buttons to upgrade the main install.
 
 
Return to the Dashboard, Upgrades screen to upgrade any plugins at the same time (we are currently using 3 plugins...) - check the compatibility notes for each...
 
 
I do not usually upgrade the themes, as ours has been customised...
 
  
 
[[Category:Developers/General]]
 
[[Category:Developers/General]]

Latest revision as of 01:08, 13 September 2021

Gnome-important.png
Notes for the [email protected]

Used in the maintenance of the Gramps website.

Upgrade Mantis Bug Tracker (bug tracker)

https://gramps-project.org/bugs/

MantisBT is an open source issue tracker.

Current installed version 2.22.1 (released: 2019-09-27)

  • 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.)
  • 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.

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)

https://gramps-project.org/wiki/

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

Current installed version 1.31.3 (released: 2019-07-02) LTS (Supported until June 2021)

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 a timeout occurs 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.31.3"

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.31.3" to "wikinew"
  • Copy the "LocalSettings.php" file from "wiki" to "wikinew" folder.
  • Copy the entire "images" folder (quite large - nearly 1.9GB) 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 also 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 - Enhance parser with logical functions
    • Thirdparty Extensions
      • Confirm User Accounts – Gives bureaucrats the ability to confirm account requests
      • LabeledSectionTransclusion
      • Variables - Parser functions allowing to work with dynamic variables in an article scoped context
      • Google Analytics Integration
    • Mediawiki:Skins(Themes)

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.


Backup the website.

Upgrade WordPress (blog)

https://gramps-project.org/blog/

WordPress is open source software used to create the blog.

Current installed version 5.8.1 (released: 2021-09-09)

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 (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).

Changing to a new Hosting service

Gramps-notes.png

Please update or expand this section.


General summary of steps taken on move to current host.

See also