Installing DotKernel 3 frontend


DotKernel 3 can be installed through a single command that utilizes Composer, because of that, Composer is required to install DotKernel Frontend.


Instructions for installing:

If you never used composer before make sure you read the Composer Basic Usage section in Composer’s documentation

Choose a destination path for DotKernel 3 Frontend installation


  • absolute path /var/www/dk3
  • or relative path dk3 (equivalent with ./dk3)

Installing the frontend Composer package

Depending on what the purpose of your project is, one of the following packages must be installed:

  • frontend - for web applications
  • admin - for administration platforms

Note: In case you need both packages, you must install them as different projects

Installing DotKernel 3 Frontend

After choosing the path for DotKernel 3 (dk will be used for the remainder of this example) and which base package to use (frontend during this example) it must be installed. Therefore to install DotKernel 3 (frontend) run the following command:

$ composer create-project dotkernel/frontend -s dev dk3

This command will begin by downloading the frontend package, after successfully downloading it, the dependencies will be downloaded and installed.

The setup script will prompt for some configuration settings, for example the lines below:

Please select which config file you wish to inject 'Zend\Session\ConfigProvider' into:
  [0] Do not inject
  [1] config/config.php
  Make your selection (default is 0):

Simply select [0] Do not inject, because DotKernel 3 includes its own configProvider which already contains the prompted configurations. If you choose [1] config/config.php Zend’s ConfigProvider from session will be injected.

The next question is:

Remember this option for other packages of the same type? (y/N)

Simply type y here, and hit enter

Configuration - First Run

  • remove the .dist extension of the file local.php.dist located in config/autoload
  • edit local.php according to your dev machine. Fill in the database configuration and smtp credentials if you want your application to send mails on registration etc.
  • Run the migrations with the command: `php vendor/bin/phinx migrate –config=”config/migrations.php”
  • get a recaptcha key pair and configure the local.php with them
  • if you use the create-project command, after installing, the project will go into development mode automatically
  • you can also toggle development mode by using the composer commands
$ composer development-enable
$ composer development-disable
  • if not already done on installation, copy file to

This will enable dev mode by turning debug flag to true and turning configuration caching off. It will also make sure that any previously config cache is cleared.

Charset recommendation: utf8mb4_general_ci

Testing (Running)

Note: Do not enable dev mode in production

  • Run the following command in your project’s directory to start PHPs built-in server:
$ php -S -t public

Composers serve script will do the exact same, but it’s easier.. In the dk3 folder run composer serve composer serve will run > php -S -t public/ public/index.php means server is open to all incoming connections means server can only be accessed locally (localhost only) 8080 the port on which the server is started (the listening port for the server)

  • visit http://localhost:8080 in your browser

NOTE: If you are still getting exceptions or errors regarding some missing services, try running the following command

php bin/clear-config-cache.php

If config-cache.php is present that config will be loaded regardless of the ConfigAggregator::ENABLE_CACHE in config/autoload/

Open a browser and access http://localhost:8080/

You should see the DotKernel Frontend welcome page.

This page was generated by GitHub Pages.