Skip to content

Install and Configure

Michael Haschke edited this page Jun 14, 2015 · 10 revisions

Install PubwichFork

Download the latest PubwichFork version from the releases page and unpack all files to your server; or clone it via Git:

$ git clone git://github.com/haschek/PubwichFork.git pubwichfork
$ cd pubwichfork

Change the permissions on the cache directory to make it writeable for for you and the webserver. You could grant read/write access to all (anonymous) users but for security reasons it is recommended to grant this rights only to your user and the user group of your www user (for the web server), e.g. under Ubuntu:

$ sudo chown youruser:www-data usr/cache/
$ sudo chmod ug+w usr/cache/

Install necessary vendor libraries using Bower.

$ sudo npm install -g bower
$ bower install

Configure PubwichFork

Configure Application

Copy the config file usr/configuration/config.sample.php to usr/configuration/config.php and edit it by following instructions in the the config file.

$ cd usr/configuration/
$ cp config.sample.php config.php
$ gedit config.php

It is recommended to configure at least:

// General site informations
define('PUBWICH_THEME', 'default');
define('PUBWICH_TITLE', 'My Pubwich-powered site');

// Localisation
date_default_timezone_set( 'Europe/Berlin' );
define('PUBWICH_LANG', ''); // leave to '' to keep Pubwich in english
setlocale( LC_ALL, 'en_EN.UTF8' ); // for date methods

// Performance - Cache and Timeouts
define( 'CACHE_LIMIT', 60 * 60 ); // 60 minutes for data
define( 'OUTPUT_CACHE_LIMIT', 30 * 60 ); // 30 minutes for html output
define( 'ENABLE_INVALID_CACHE', true ); // use invalide caches to speed up response time

More Options

Configure Services

You need to configure all web service aggregations in config.php too. Simply fill the blank spaces with your informations (API keys, usernames, site’s URL, etc.) and modify the arguments passed to Pubwich::setServices(). Some basic examples are included in the configuration file. For an extended documentation please see Web Service description.

Finish Installation

Usually you should be finished here, just test it by calling the URL of your PubwichFork instance in your browser, e.g. if you installed it to /var/www/mypubwichfork it should be accessable via http://localhost/mypubwichfork.

Upgrade from PubwichFork 2.1 to 2.9+

  1. Backup your PubwichFork installation.

  2. Install PubwichFork 3.x and copy your configuration backup file to usr/configuration/config.php.

  3. Copy your theme folder to usr/themes.

  4. If you developed own service classes, copy them to usr/services.

PubwichFork 2.9+ is compatible to configurations and filters from 2.1. The old template system is now deprecated but it is still supported in 2.9+

Report Problems

If you are running into problems, then write a message to @haschek or add a bug report to the issue tracker. Thank you!