CodeIgniter Directory Structure

In the previous tutorial, we learned about the basics of Codeigniter and how to install Codeigniter. In this tutorial, we will learn about CodeIgniter directory structure.

Codeigniter file structure contains three main folders:

  1. application
  2. system
  3. user_guide

and also contain two files index.php and license.txt.
index.php default file of the codeigniter and license.txt contain the licence of the Codeigniter.

user_guide folder  –

user-guide contains the entire codeigniter user guide. You can  view on your local system by visiting this url http://localhost/codeigniterdirectory/user_guide/ and you can view up-to-date copy on CI user_guide on the CI official website on this link

system folder –

System folder contain all inner work of codeigniter .This folder contain the core functionality and all built-in libraries of CI .

application folder –

Application is the main folder of CI. The application folder contain the application file we are building.
This folder contain application MVC(Model, View, Controller) and other code(like helper and class extensions).
cache folder –  In this folder all cached pages for our application.
config folder –  Application configuration file where we can set configuration of our application(like base url).
controller folder –  This folder contain our class file developed for our application.
core folder – Contain base file of application.
error folder – In this we will place application specific error logs.
helper folder – This folder contain all includes file of our application.
hooks folder- Hooks in CodeIgniter helps you to modify the core functionality of the framework without modifying the core files. Hooks folder contains all the files which has code related to Hooks.
language folder – In this folder we will place language macros and contants
libraries folder – In this folder we will place own developed libraries.
logs folder – In this we will place application error, access and other logs.
models folder – This folder contain database fetching logics. Model deals with back-end operations.
third_party – If third party plugins used in our application will be placed in this folder.
view folder – This folder contain our HTML template. View deals with fronted operations.]]>

Recommended Tutorials for you


Anuj kumar

This is Anuj Kumar. I’m a professional web developer with 5+ years of experience. I write blogs in my free time. I love to learn new technologies and share with others. I founded PHPGurukul in September 2015. The main aim of this website to provide PHP, Jquery, MySQL, PHP Oops and other web development tutorials. .


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to top button