Updating

padams edited this page Jan 28, 2015 · 1 revision

It is possible to update an existing OWA instance in just a few steps, however you will need access to the filesystem of the server where OWA is running.

Table of Contents

Pre-Update Steps

  • Take a snapshot/backup of your database just in case the update fails and you need to roll back to your prior version.
  • Delete your /path/to/owa/owa-data/caches directory.

Updating From a Tarball

Follow these steps to update your instance:

  • Download the latest tarball from http://downloads.openwebanalytics.com/owa
  • Unpack the tarball and replace your current OWA files with the new ones.
  • Check to see if any database updates are required by opening a web browser and navigating to your OWA dashboard at http://yourdomain/path/to/owa. If database updates are required OWA will prompt you to do apply those updates via the browser or tell you to run the update command using OWA's command line interface (CLI).

Updating from SVN

If you installed OWA using SVN, you can easily keep our installation up to date by updating your instance directly from our SVN repository using the following steps:

  • Login to your server and cd /your/path/to/owa to enter the OWA's base directory.
  • Type svn info to ensure that OWA's base directory is under svn control.
  • If it is, then change the directory in OWA's svn repository that you want to now pull updates from using the svn switch command.
SVN's switch command takes a URL as an argument so you will need to give it the proper url pointing to the version in OWA's svn repository that you want to update to. The URL to individual versions of OWA in the repository is http://svn.openwebanalytics.com/owa/tags/VERSION where VERSION is the version number that you want to upgrade to (e.g. 1.2.2).
  • Check to see if any database updates are required by opening a web browser and navigating to your OWA dashboard at http://yourdomain/path/to/owa. If database updates are required, OWA will prompt you to do apply those updates or tell you to run the update command using OWA's command line interface (CLI).

Applying Database Updates from the Command Line Interface

When updating OWA (or any third party modules) from a prior version, the update may require changes be made to OWA's database schema. Because the time to apply updates to database tables vary by the size of the database, it is sometimes not possible to perform these updates via the browser interface.

Instead, all database updates can be applied via OWA's command line interface (CLI). This requires that you have access to run PHP scripts in your server command shell.

To apply database updates via the CLI, run the following in the command shell on your server:

/path/to/php5 /path/to/owa/cli.php cmd=update

See the documentation for the update command for more options.

Updating from Version 1.2.0 or Earlier

Updating from version 1.2.0 or earlier requires some special steps outlined below.

Updating Wordpress Installations

  • Deactivate the OWA plugin via Wordpress's plugin management screen
  • Download the most recent tarball and replace the prior version of OWA's files or alternatively svn switch to the tag you want to upgrade to.
  • if you created an OWA configuration file in the past, then modify your PUBLIC URL as described below in the standalone upgrade instructions. If you did not create a configuration file in the past skip this step as OWA will now create one for you.
  • Reactivate the OWA Wordpress plugin
  • Navigate to any OWA page within your Wordpress admin interface
  • OWA will prompt you to apply the latest updates.

Updating Standalone Installations

  • Download the most recent tarball and replace the prior version of OWA's files or alternatively svn switch to the tag you want to upgrade to.
  • Edit the value of the PUBLIC URL in your configuration file from: http://domain/path/to/owa/public/ to: http://domain/path/to/owa/
  • You can now access your OWA installation at: http://domain/path/to/owa/
  • The OWA Updater will prompt you to apply the latest updates.
  • Be sure to generate new tracking tags to take advantage of the latest features

Updating MediaWiki Installations

  • Download the latest tarball and replace the prior version of OWA's files or alternatively svn switch to the tag you want to upgrade to.
  • Create an OWA configuration file by copying owa-config-dist.php to owa-config.php in the same directory. Edit your owa-config.php file and enter your database connection info and enter the the web URL of OWA's base directory as the value of your PUBLIC URL (should be similar to http://yourdomain/extensions/owa/. Don't leave off the ending slash).
  • if you created a OWA configuration file in the past, then just modify your PUBLIC URL as described above.
  • Navigate to the OWA Special Page within your MediaWiki
  • OWA will prompt you to apply the latest updates