Installation
From Open Web Analytics Wiki
Contents |
Before you begin...
- Read the Technical Requirements to make sure that OWA can be installed on your system.
- Make sure that OWA's directory (/path/to/owa) is writable by whatever user account that PHP is running under. This is needed for OWA to create directories and files for its logs, caches, etc.
Stand Alone Installation
Pre-Install Steps
Before you start the installation there are a few server environment setups that you'll need to ensure are in place or completed.
Database Connection
As part of the OWA installation process, you will be asked for database connection information that will be used by OWA to create its tables and begin logging statistics. Prior to starting the install process you will want to either setup a new database for OWA to use (recommended) or choose an existing database. Either way OWA's installer requires a few pieces of database connection info:
- Database Host - this is the name of the host on which the database can be accessed. This could be a remote host such as db.yourdomain.com or, if OWA is running on the same host as your database instance you can use localhost.
- Database Name - this is the name of the database that OWA should read and write to. This database needs to be created if it does not exist prior to starting the install.
- Database User - this is the user account that OWA will use to connect to your database. This database user account must have permission to read and write to the database that you want OWA to use.
- Database Password - this is the password of the database user.
As part of the installation OWA will write this information to a newly created owa-config.php configuration file - where it can be changed later if you need to modify the database that OWA read and writes from.
The OWA installer will create all the tables that it needs using the owa_ table prefix.
Installation Steps (v1.2.1RC1 or later)
- Download the latest OWA distribution or check it out of SVN.
- Place the 'owa' folder somewhere within the document root of your web server. The 'owa' folder must be accessible by web browsers.
- Start the installation wizard by pointing your web browser at:
http://yourdomain/path/to/owa/install.php
Installation Steps (v1.2.0 and prior)
- Download the latest OWA distribution or check it out of SVN.
- Place the 'owa' folder somewhere on your web server.
- Rename the file ..owa/conf/owa-config-dist.php to owa-config.php in the same location
- Edit OWA's main configuration file (owa-config.php) specifying your database connection information and default URL.
- Start the installation wizard by pointing your web browser at:
http://yourdomain/path/to/owa/public/install.php
WordPress Installation
To install OWA under a single instance of Wordpress, follow these steps:
- Download the latest OWA distribution or check it out of SVN.
- Move the entire 'owa' folder into the WordPress plugins folder which is located at /path/to/wordpress/wp-content/plugins. NOTE: the folder must be named 'owa' (without the quotes) to work.
- Login into your WordPress blog and activiate the plugin via the "Plugins" admin screen. This will create all of the required databse tables in the same datbase that wordpress is using. OWA tables will be created with the owa_ prefix by default.
That's it. OWA will immediately start tracking Wordpress generated web pages and feeds. In addition, you can then configure various OWA options in WordPress by visiting the OWA options page which should now appear under the main Options tab in the WordPress admin interface.
WordPress Theme Compatibility
In order for OWA's WordPress plugin to work, your WordPress theme needs have the following line of php somewhere above the </body> tag in its footer.php template:
<?php wp_footer(); ?>
Most WordPress themes are well formed and come with this Wordpress API call in the footer.php template already, so most people will not need to modify their theme to make OWA work. For more information on how to make sure that your themes work with WordPress plugins see: http://codex.wordpress.org/Theme_Development
Incompatible WordPress Plugins
- WP-Cache - OWA does not currently work if WP-Cache is active. Specifically it breaks tracking and the geolocation reports due to it's instance on a setting text/html Content-Type HTTP header.
MediaWiki Installation
NOTE: The OWA MediaWiki plugin will disable all of mediawiki's content caching features. This is needed to track mediawiki pages at this time.
- Download the latest OWA distribution or check it out of SVN.
- Move the entire OWA folder into MediaWiki's extensions folder.
- Add the following line of PHP to the bottom of MediaWiki's LocalSettings.php file:
require_once('extensions/owa/mw_plugin.php'); - Navigate to MediaWiki's list of Special pages
- Click on the Open Web Analytics Special page
- Follow on-screen instructions to install OWA.
Gallery 2.2 Installation
Currently requires Gallery 2.2.4 or later.
- Download the latest OWA distribution or check it out of SVN.
- Move the entire OWA folder into Gallery's modules folder.
- Add the following code to the footer of whatever Gallery theme you are going to use:
{g->callback type="owa.pagetags"} {$block.owa.pagetags.owaData} - Login to Gallery as an administrator and navigate to the Site Admin -> Plugins page.
- Scroll down the list of plugins and click on the install link next to Open Web Analytics.
Re-installing OWA
A clean re-install of OWA requires the following:
- drop all owa_ tables from your database
- remove the cache directory for your configuration (usually: /path/to/owa/owa-data/caches/1)
Upgrading
Follow the upgrade procedures outlined in the Release Notes for the version of OWA that you are upgrading to.





