CodeIgniter Framework Directory Structure

Posted on December 1, 2019 By

In this below image you can see the basic directory structure of CodeIgniter.


CodeIgniter directory structure is divided into three main folders.

  • application
  • system
  • user_guide

Application Directory

This is a main directory in CodeIgniter framework Directory Structure. All code for building a web application project will goes under this application folder. Application directory have some sub-directories as below.



  • Cache − This directory stores all the cached pages of web application. Cached pages makes serve page content fast and increase the overall speed of response and accessing the pages.
  • Config − This directory includes various files for configure the application. By using config.php file, user can configure the web application. By using database.php file, user can configure the database options like database name, username, password of the web application.
  • Controllers − This directory includes all controllers of your web application.
  • Core − This directory includes all base class of your web application.
  • Helpers − This directory includes helper classes and functions of your web application.
  • Hooks − The files in this directory provide a feature to tap into and modify the inner workings of the framework without hacking the core files of framework.
  • Language − This directory includes files related to language. You can create text files with your selected language and can use them in your web application.
  • Libraries − This directory includes files of the libraries developed for your web application.
  • Logs − This directory includes files related to the log of the system. When there is a error or exception happend in application then detail of error or exception is stored in this directory.
  • Models − This directory includes all defined models for application. Models are basically used for load database queries for create output in application.
  • Third_party − This directory used for store third party plugins, which will be used in your web application.
  • Views − This directory includes all HTML files for your application.

System Directory

This directory includes CodeIgniter core, helpers, language, libraries and some other files. These libraries and helpers are loaded and used for web application development. These is a main part of application as all framework logic is build from here so don’t make change or update anything in these directory files.



  • Core − This directory includes CodeIgniter’s core class files. All framework logic is handled from here. Don’t make any changes directly in these directory files. If you want to make changes for any default function of framework file then you most do this in application directory by using hooks for web development.
  • Database − This directory includes database drivers,cache and other database utilities need for database operations.
  • Fonts − This directory includes font related information and other utilities.
  • Helpers − This directory includes default CodeIgniter helpers like date, URL helpers and cookie.
  • Language − This directory includes default language files for web development.
  • Libraries − This directory includes default CodeIgniter libraries used for perform some actions for e-mail, file uploads, calendars and many more other. You can create your custom libraries or can make change in behaviour of current existing function, but you must have to put these in the application/libraries directory.

User_guide Directory

This is just a reference guide for all the functions, libraries, helpers of CodeIgniter framework.

Leave a Reply

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