Codeigniter Free Responsive Bootstrap Template with Basic Setup - Mostlikers

27 September, 2016

Codeigniter Free Responsive Bootstrap Template with Basic Setup

Today we are going to see how to load bootstrap template to codeigniter frameworkI have created a Codeiginter free poster template with basic setup autoload function. It will be help for freshers. If you want swap your normal html website to codeiginter follow the below simple steps. there i have explain about complete codeigniter libriary,url,constant,route setup.

Codeigniter Bootstrap Template Free Download With Basic Setup.

Live demo                Download

Index of the content
  • Codeigniter download latest version file and setup with local server.
  • Load html templates to the Codeigniter project folder.
  • Creating controller class name and function 
  • Load css,js,images ect (Application assets location).
  • Autoload file basic (url,session) Setup.

Codeigniter download

Download latest version codeigniter file, Extract your localhost or server.

Convert Html To Codeigniter And Basic Steps Of Codeigniter

Free bootstrap templates download

I have used free responsive bootstrap template for demo purpose. So i would suggest you to download agency template files.

Free bootstrap templates download

How to integrate html template in codeigniter

Paste and extract downloaded file to your local server. If you are using xmpp server extract your files to htdocs folder. For wamp users www folder.
Codeigniter Load CSS And Javascript Files

Create one new folder name called as 'resources' paste your all css,js,images file to that folder.

Xampp --> htdocs --> codeiginter --> resources -- > load all css,js folder here

Paste or create your html files to views folder. Make sure all the files should be .php function. 

htdocs--> codeiginter --> application-- > Views --> template files with .php  (home.php)

Load css,js,images ect (Application folder location)

We have complete the 3 simple level now we need to configure the codeiginter files and give the connection of CSS and JS files.

open  codeigniter --> application --> config --> constants.php  for configuring CSS and JS. Add below 3 line code.

define('CSS','resources/css'); // <?php echo base_url(CSS) ?> css files locations
define('JS','resources/js'); // <?php echo base_url(JS) ?> access js file
define('IMAGES','resources/img'); <?php echo base_url(IMAGES) ?> images location

Make sure that your all style sheet,script,images file to the respected folder(resource) .
after that change all style sheet, script, images local server link.

<script src="http://localhost/codeiginter/agency.min.js"></script>
<script src="<?php echo base_url(JS); ?>/agency.min.js"></script>

Codeigniter Bacis Setup configuration,libraries,ht-access

This very important step first load your project file base_url. It will specify your project path location.

$config['base_url'] = 'http://localhost/codeigniter/';


Codeigniter Bacis Setup configuration,libraries

Find the below replace the code

$autoload['libraries'] = array();
$autoload['libraries'] = array('database', 'email', 'session');

Load url helper

$autoload['helper'] = array();
$autoload['helper'] = array('url', 'file');


Open default controller welcome.php files load your html files.

defined('BASEPATH') OR exit('No direct script access allowed');

class Welcome extends CI_Controller {
    public function index()
        //path views/home.php
        //home is a templatefile name.
    public function demo()


If you want to remove index.php url structure use this below code.

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
 remove index.php


  1. Rana From Haryana14 October 2016 at 05:06

    Orrr Bhayya Karthick ...
    Kesa Chal Raha Hai Sab... ?