CodeIgniter v3.* Composer Installer
This package installs the offical CodeIgniter (version 3.1.*) with secure folder structure via Composer., (*1)
You can update CodeIgniter system folder to latest version with one command., (*2)
Folder Structure
codeigniter/
โโโ application/
โโโ composer.json
โโโ composer.lock
โโโ public/
โย ย โโโ .htaccess
โย ย โโโ index.php
โโโ vendor/
โโโ codeigniter/
ย ย โโโ framework/
ย ย โโโ system/
Requirements
- PHP version 5.6 or newer is recommended. It should work on 5.3.7 as well, but we strongly advise you NOT to run such old versions of PHP, because of potential security and performance issues, as well as missing features.
-
composer command (See Composer Installation)
- Git
How to Use
Install CodeIgniter
$ composer create-project cahyadsn/ci-installer codeigniter
Above command installs public/.htaccess to remove index.php in your URL. If you don't need it, please remove it., (*3)
And it changes application/config/config.php:, (*4)
$config['composer_autoload'] = FALSE;
โ
$config['composer_autoload'] = realpath(APPPATH . '../vendor/autoload.php');
$config['index_page'] = 'index.php';
โ
$config['index_page'] = '';
Install Translations for System Messages
If you want to install translations for system messages:, (*5)
$ cd /path/to/codeigniter
$ php bin/install.php translations 3.1.11
Install Third Party Libraries
Codeigniter Gen CLI:, (*6)
$ php bin/install.php gen-cli master
Modular Extensions (HMVC) for CodeIgniter 3:, (*7)
$ php bin/install.php modular-extensions-hmvc 1.1.0
Ion Auth:, (*8)
$ php bin/install.php ion-auth 3
Ion Auth ACL:, (*9)
$ php bin/install.php ion-auth-acl master
CodeIgniter Rest Server:, (*10)
$ php bin/install.php restserver 3.1.4
CodeIgniter Log:, (*11)
$ php bin/install.php ci-log master
ci-datatables:, (*12)
$ php bin/install.php ci-datatables master
CodeIgniter Developer Toolbar:, (*13)
$ php bin/install.php codeigniter-develbar master
Run PHP built-in server (PHP 5.4 or later)
$ cd /path/to/codeigniter
$ bin/server.sh
Update CodeIgniter
$ cd /path/to/codeigniter
$ composer update
You must update files manually if files in application folder or index.php change. Check CodeIgniter User Guide., (*14)
Reference