Skip to content
This repository has been archived by the owner on Dec 3, 2018. It is now read-only.

1. Installation

Bizley edited this page Jan 10, 2018 · 22 revisions

Requirements

  • Yii 2.0.8 or newer

6 STEPS INSTALLATION

1. Extension Installation

The preferred way to install Podium is through Composer.

Run command composer require bizley/podium or add "bizley/podium": "*" to the require section of your composer.json and run composer update.

If you prefer not to use Composer follow instructions at the end of this page.

2. Extension Configuration

Update or add the following lines to your configuration file:

'bootstrap' => ['log', 'podium'],
'components' => [
    'db' => [
        'class' => 'yii\db\Connection',
        'dsn' => 'mysql:host=host_address;dbname=database_name',
        'username' => 'username',
        'password' => 'password',
        'charset' => 'utf8',
    ],
],
'modules' => [
    'podium' => [
        'class' => 'bizley\podium\Podium',
    ],
],

With this configuration Podium takes care of user identity which means that users can register and sign in independently from the main application (and because of that user signed in to the application will not be signed in to the Podium and vice versa).

If you would like Podium to inherit user application's identity (so users signed in to the application will be signed in to the Podium as well) follow instructions at Advanced Installation section.

3. Extension Console Configuration

Update or add the following lines to your console configuration file:

'bootstrap' => ['log', 'podium'],
'modules' => [
    'podium' => 'bizley\podium\Podium',
],
'components' => [
    'db' => [
        'class' => 'yii\db\Connection',
        'dsn' => 'mysql:host=host_address;dbname=database_name',
        'username' => 'username',
        'password' => 'password',
        'charset' => 'utf8',
    ],
    'mailer' => [
        'class' => 'yii\swiftmailer\Mailer',
        'useFileTransport' => false,
        'transport' => [
            'class' => 'Swift_SmtpTransport',
            'host' => 'SMTP host',
            'username' => 'SMTP username',
            'password' => 'SMTP password',
            'port' => 'SMTP port', // optional
            'encryption' => 'SMTP encryption', // optional
        ],
    ],
],

Configure mailer components so Podium can send emails.

4. Podium Installation

Go to the podium/install (or podium/install/run in case of not using UrlManager's pretty URLs) URL of your application.
Click Start Podium Installation button.

Podium will create all database tables and prepare administrator account.

5. Podium Configuration

Sign in to Podium using administrator account.
Go to the Administration section and then click the Settings tab.
Modify all necessary fields (make sure you set proper Podium "From" email address - otherwise there might be a problem with sending emails).

6. Cron job

Add and customize the following cron job:

*/2	* * * * php /path/to/your/application/yii podium/queue/run &>/dev/null

This will try to send up to 100 emails every other minute.

ALL DONE!




OPTIONAL: Installation from zip file

If you are not a Composer fan you can download Podium preinstalled with Yii 2.

With every release you can find zip file attached named like yii2.*-with-podium*.zip.
Inside you get Podium with Yii 2 (Basic Application Template).

Some details:

  • Yii 2 composer.json require-dev section has been removed along with its packages.
  • Podium is preconfigured with default minimal settings.
  • All packages are up-to-date (at the time of preparing zip file).

Installation steps

1. Unpack the contents of zip file.

More details about installing Yii 2 from an archive file can be found in the Guide.

cookieValidationKey in the yii2-basic/config/web.php file has already been set - change it if you want.

2. Configure server.

Follow the instructions at Configuring Web Servers.

3. Configure Podium.

If you want to change the default Podium configuration follow the instructions at Composer installation - steps #2 and #3.

4. Install Podium.

This step is just like in the Composer installation from step #4 to #6.