Help | kohany.com
Download the latest version, and extract it onto your server.
Now point your browser to base url /
to test your environment and make sure all requirements are passed.
You may need to make application/logs/
, application/cache/
and thumbnails/
folders writable. Using an ftp client you can usually right-click on each folder, click on permisions, and mark as group and world writable. If you have command-line access you can run the following commands:
chmod 777 application/logs/
chmod 777 application/cache/
chmod 777 thumbnails/
Now you should rename or remove install.php
to something like _installed.php
at root directory.
You will need to create a database, and a database user with access to that database, and then edit application/config/database.php
with those settings. Here is the relevant pieces of that file:
'hostname' => 'localhost',
'username' => 'PUT USERNAME HERE',
'password' => 'PUT PASSWORD HERE',
'persistent' => FALSE,
'database' => 'PUT DATABASE HERE',
At the next step enter email, password for the user admin
and secret key for remote access, after that click Install. If you get no errors, then Kohany is installed!
For security, you should remove or rename application/classes/controllers/install.php
to something like application/classes/controllers/_installed.php
and install.sql
to something like _installed.sql
.
If Kohany is not in the root of the server we need to change some files. Lets say we are putting Kohany in a subfolder called subfolder.
In .htaccess
RewriteBase /
## change to ##
RewriteBase /subfolder
In application/bootstrap.php
'base_url' => '/',
## change to ##
'base_url' => '/subfolder',
*If you put Kohany in a subfolder, the links on all your pages will probably be broken.
In index.php
error_reporting(E_ALL | E_STRICT);
## change to ##
error_reporting(E_ALL & ~E_DEPRECATED);
server { listen 80; server_name example.com; set $root_path '/path/to/kohany'; root $root_path; access_log /var/log/nginx/ko-access.log; error_log /var/log/nginx/ko-error.log; index index.php index.html index.htm; try_files $uri $uri/ @rewrite; location @rewrite { rewrite ^/(.*)$ /index.php/$1; } location ~ \.php { fastcgi_index /index.php; fastcgi_pass 127.0.0.1:9000; include fastcgi_params; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } location ~* ^/(css|fonts|img|js|min)/(.+)$ { root $root_path; } location ~ /\.ht { deny all; } }
Log in as admin user and go to admin panel /admin
.
In Settings » General
set your Web address and other options such as title, description.
In Settings » Payments
set payment methods and data such as username, password.
In Settings » E-mail
set how to send emails and admin email.
In Settings » Adverts
enter your own advertising codes.
Follow Settings » Cron
to set cron jobs.
In Groups » Show
edit groups parameters such as price, days, min Page Rank.
All official development is by the Kohany Team and tracked on our developer site.
If you want to report a bug, translation or make a features request, follow issues link.
Typically, you only need change the folder application/
. Before the update, it is recommended to make a backup copy of your database and files.
Make a copy of database config application/config/database.php
.
Copy the files that have been modified by you, eg from the folders application/views/
, themes/your_template
, themes/default/headers
.
Delete old and copy new or overwrite the folder application/
.
Remove file application/classes/controller/install.php
.
Restore database config file.