Website application upgrades

From Gramps
Jump to: navigation, search

Upgrade Mantis Bug Tracker (bug tracker)

Backup grampsbugs mysql database using the CPanel interface.

Download latest version of Mantis - I use the .tar.gz file.

Upload the .tar.gz file into the Gramps hosting either ftp or using the CPanel file manager.

Use the CPanel file manager to unarchive it into / - it will create a new folder such as mantisbt-1.2.14.

Rename the new folder from such as mantisbt.1.2.14 to bugsnew.

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.

Check any readme type files to make sure there are not any database schema changes required - and follow the directions if there are...

Rename the original folder from bugs to bugsold.

Rename the new folder from bugsnew to bugs.

See if it works! Login as a user and test a few things.

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

If not immediately functional, revert by renaming bugs to bugsnew and bugsold to bugs - that should put it back to square one...

Remove the admin folder (there is a warning first time you login as an admin to do this).

Remove the .tar.gz file you uploaded.

After a week or two, remove bugsold.

Modifications so product version is required:

In core/bug_api.php added this in just below:

 function validate( $p_update_extended =  true) {

 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 *

Change:

           <?php echo lang_get( 'product_version' ) ?>            

To read:

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

Upgrade Media Wiki (wiki)

grampswiki is quite a large database, and Media Wiki upgrades are generally more likely to have problems than other actions in Gramps!

Use the Gramps interface (MySQL, then phpMySQL) to remove the often large cache tables of grampswiki (l10n_cache and objectcache).

Backup grampswiki using the CPanel interface.

Download the latest version of Media Wiki - I use the .tar.gz file.

Upload the .tar.gz file into the Gramps hosting.

Use the CPanel file manager to unarchive it into / - it will create a new folder such as mediawiki-1.20.2.

From here, you can use a combination of the file manager or ssh, so long as you get it all done!

Rename the new folder from such as mediawiki-1.20.2 to wikinew.

Copy the LocalSettings.php file from wiki to wikinew.

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.

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

See also