Fact-checked by Grok 2 weeks ago

CodeIgniter

CodeIgniter is an open-source full-stack designed as a lightweight, fast, and flexible toolkit for developers to build dynamic web applications with minimal configuration and a small footprint of approximately 1.1 MB. It follows the Model-View-Controller (MVC) , providing built-in libraries for common tasks like database interaction, form validation, and session management, while emphasizing simplicity over complexity and allowing core components to be extended or replaced as needed. Originally developed by EllisLab, the framework's first public version (Beta 1.0) was released on February 28, 2006, as a response to the need for a straightforward development toolkit. In October 2014, EllisLab transferred maintenance of CodeIgniter to the (BCIT), leading to it becoming a community-driven project. It is now maintained by the CodeIgniter Foundation and hosted on under the codeigniter4 organization for version 4, continuing to receive updates and security fixes. CodeIgniter 4, the current major version released on February 24, 2020, targets 8.1 and later, introducing enhancements like improved routing, context-sensitive escaping for security, and support for modern features while maintaining for legacy code where possible. Key strengths include exceptional performance that outperforms many competitors, robust built-in protections against CSRF and XSS attacks, nearly zero-configuration setup (requiring only a database connection), and comprehensive with tutorials and reference guides to facilitate rapid development.

Introduction

Overview

CodeIgniter is an open-source full-stack designed for building dynamic web applications, emphasizing simplicity, speed, flexibility, and security. It serves as a lightweight toolkit that enables developers to create full-featured websites with minimal configuration and a logical structure, reducing the amount of code required for common tasks. Originally developed by EllisLab and now maintained by the CodeIgniter Foundation, the framework prioritizes elegant solutions over unnecessary complexity, making it accessible for developers seeking efficient project development. At its core, CodeIgniter employs a Model-View-Controller (MVC) architecture, which separates application logic, presentation, and data handling to promote maintainable code, though it does not strictly enforce this pattern. The framework maintains a small footprint, with version 4 requiring only a 1.1 MB download, allowing for quick deployment and low resource usage compared to heavier alternatives. This compact design contributes to its exceptional performance, consistently outperforming many competing frameworks in benchmarks. CodeIgniter is particularly suited for developing dynamic websites, RESTful APIs, and small-to-medium-sized applications, where and without excessive overhead are essential. Unlike plain development, which often involves writing extensive for routing, security, and database interactions from scratch, CodeIgniter provides pre-built libraries and helpers that streamline these processes, significantly accelerating development timelines.

Key Characteristics

CodeIgniter is renowned for its simplicity, requiring nearly configuration to get started, as most settings are pre-configured out of the box, allowing developers to focus primarily on connecting a database and building applications. This design philosophy emphasizes a straightforward and logical structure, minimizing the and often associated with more complex frameworks. The framework's high performance stems from its lightweight architecture, with a core download size of just 1.1 MB, and the absence of strict dependencies beyond standard PHP extensions, enabling efficient execution even on modest server resources. This small footprint contributes to exceptional speed in handling requests, making it suitable for resource-constrained environments without compromising functionality. CodeIgniter offers significant flexibility in coding standards, supporting both object-oriented and procedural styles without enforcing rigid conventions, as evidenced by its procedural helper functions that integrate seamlessly with object-oriented core components. Developers can extend or replace core elements as needed, working in their preferred manner while adhering to the framework's MVC encouragement rather than strict enforcement. As of 2025, CodeIgniter 4 is compatible with 8.1 and later versions, including support up to PHP 8.4 with version 4.6.0 or higher, and it runs on standard web servers such as (requiring mod_rewrite for URL rewriting) and (with appropriate configuration for ). This broad compatibility ensures deployment across diverse hosting environments without additional setup hurdles. Security is integrated at a foundational level, featuring built-in protections against (CSRF) through configurable token-based mechanisms like double-submit cookies or session synchronizer tokens, applicable to POST, PUT, PATCH, and DELETE requests. Additionally, it provides defenses against cross-site scripting (XSS) via context-sensitive escaping and content security policy (CSP) support introduced in version 4, helping mitigate common web vulnerabilities without external libraries.

Architecture

Model-View-Controller Pattern

CodeIgniter employs the Model-View-Controller (MVC) to organize application code, separating , , and request handling into distinct components for improved structure and flexibility. This approach ensures that application logic remains isolated from presentation, allowing developers to modify one aspect without disrupting others. The Model component handles and , including interactions with , validation of rules, and retrieval or storage of information such as user records or content posts. It focuses solely on data operations without concern for display or user input. The View represents the , responsible for rendering to the user through templates like pages or fragments, incorporating minimal code for outputting variables passed from the controller. The Controller acts as the orchestrator, processing incoming HTTP requests, validating input, interacting with models to fetch or update , and directing the appropriate view for output, such as handling or redirects. CodeIgniter enforces the MVC pattern via a standardized in its application folder, particularly in version 4 and later, where controllers reside in app/Controllers, models in app/Models, and views in app/Views, often organized by controller for clarity (e.g., app/Views/user/profile.php). This layout promotes consistency and ease of navigation across projects. The MVC implementation in CodeIgniter enhances by isolating components, enabling large web applications to grow modularly without widespread code changes, and supports team collaboration by allowing multiple developers to work in parallel on models, views, or controllers without conflicts. A basic MVC flow in CodeIgniter begins with a request to a , which routes to a controller ; the controller then queries a model for data (e.g., fetching news articles from a database), processes the results, and loads a to render the output for the . For instance, accessing a homepage might trigger the home controller to retrieve site data via a model and pass it to a for display.

Core Components

The core of CodeIgniter begins with the bootstrap process initiated by the public/index.php file, which serves as the primary for all HTTP requests. This script loads the configuration from a .env file at the project root, defines essential path constants for the system and application directories, and initializes the to enable seamless class loading throughout the framework. By handling these foundational steps, index.php ensures that the framework's components are ready before the request to the appropriate controller, integrating with the Model-View-Controller to maintain a structured application flow. Autoloading in CodeIgniter is managed through a flexible system configured in app/Config/Autoload.php, which adheres to PSR-4 standards for namespaced classes and supports Composer integration for third-party dependencies. The autoloader registers itself via PHP's spl_autoload_register() during bootstrap, automatically resolving and loading classes from defined namespaces—such as App for application code and Config for configuration—without requiring manual require statements. This mechanism enhances developer efficiency by reducing boilerplate code and ensuring that core and application classes are available on demand. Key classes form the backbone of request and response handling within the . The Router class, accessible via service('router'), processes incoming URIs by matching them against rules defined in app/Config/Routes.php, supporting both manual defined routes with placeholders like (:num) for segments and auto-routing based on conventions. It determines the target controller and method, enabling structures while accommodating HTTP verbs such as GET and for precise request dispatching. For input management, the IncomingRequest class—available as $this->request in controllers or through service('request')—encapsulates client-submitted data from sources like $_GET, $_POST, $_COOKIE, and raw input streams, providing methods such as getPost() and getJSON() to retrieve and filter values securely using PHP's filter_var(). This class ensures that request data is sanitized and accessible in an object-oriented manner, mitigating common security risks like . Response formatting is handled by the Response class, which extends the HTTP Message class and is globally available via $this->response or Services::response(). It manages output by setting status codes with setStatusCode(), formatting content as JSON or XML via setJSON() or setXML(), and adding headers or redirects as needed, ultimately sending the finalized response to the client. Features like caching configuration through setCache() further optimize delivery without altering core logic. Configuration settings are centralized in the app/Config directory, where each file represents a class extending CodeIgniter\Config\BaseConfig with public properties for environment-specific values, such as the base URL in Config\App::$baseURL or error display options. These classes are instantiated using config('ClassName') or direct new \Config\ClassName(), allowing overrides via the .env file for variables like CI_ENVIRONMENT=production, which influences behaviors including error handling and URI protocols. This modular approach facilitates customization without modifying the framework's source code. The event system, configured in app/Config/Events.php, employs a publish-subscribe pattern to extend framework functionality without altering core files, replacing the hooks mechanism from earlier versions. Developers register listeners using Events::on('eventName', 'callback'), with priorities (e.g., PRIORITY_HIGH=10) to control execution order during key points like pre_system or post_controller_constructor. Core events such as those for database queries (DBQuery) or email sending (email) allow interception and modification of internal processes, promoting maintainable extensions through simulated testing modes for verification.

Features

Built-in Libraries

CodeIgniter's built-in libraries provide developers with ready-to-use classes for handling common tasks, enabling faster prototyping and implementation without reinventing core functionalities. These object-oriented components are loaded via the framework's service locator or autoloading mechanisms and integrate seamlessly into controllers and models, promoting modular code and reducing boilerplate. By abstracting complex operations like database interactions and form processing, they support rapid development while maintaining flexibility for customization. The Database library offers an abstracted interface for database connections, supporting multiple drivers such as , , and through a that specifies host, username, password, and other parameters. It includes the Query Builder class, which provides an Active Record-like pattern for constructing queries, allowing methods like select(), from(), where(), insert(), update(), and delete() to generate secure SQL statements without direct string concatenation, thus minimizing risks and enhancing productivity. For database schema management, the library integrates with the system, enabling version-controlled alterations via classes that define up() and down() methods for applying and reverting changes, such as creating or modifying tables. The Form Validation library simplifies input sanitization and verification by defining rules as arrays or strings in controllers, supporting over 40 predefined rules like required, valid_email, min_length, and matches for checking data integrity. Developers can extend functionality with custom callbacks or rule classes for specialized validation logic, and the library automatically repopulates form fields on failure while generating error messages for display, often using the validation_list_errors() helper for formatted output. This streamlines user input handling in web forms, reducing validation code and improving user experience through immediate feedback. Session and cookie management are handled by dedicated libraries that maintain user state across requests. The Session library stores data in files, databases, or , with methods like set(), get(), has(), and remove() for manipulating session variables, while supporting secure configurations for cookie-based storage, including encryption and expiration settings. Complementing this, the Cookie library abstracts cookie creation and manipulation using the Cookie class, allowing specification of name, value, expiration, path, domain, and secure/HTTP-only flags via an options array, ensuring compliant and safe client-side data persistence. Together, these libraries facilitate stateless HTTP management essential for features like user authentication and preferences. The library supports sending messages via multiple protocols including , , and SMTP, with configurable options for server host, port, authentication, and attachments defined in a dedicated config file. It offers methods for setting recipients, subjects, bodies (HTML or plain text), and attachments, along with features like BCC, priority, and formatting to comply with email standards, making it straightforward to integrate transactional emails like notifications or confirmations into applications. File upload handling is provided by the Uploaded Files library, which extends PHP's $_FILES into secure, object-oriented instances accessible via $this->request->getFile(). It includes validation methods for types, file size, and extensions, along with move() for secure relocation to directories and error checking via hasMoved() or getError(), preventing common vulnerabilities like arbitrary file execution. Configuration options allow setting upload paths, maximum sizes, and permitted types, accelerating secure media handling in forms. The Pagination library generates navigation links for large datasets, integrating with models via the paginate() method to automatically calculate total pages, current page, and per-page limits from query results. It supports customizable templates for links (e.g., "Previous", "Next", numbered pages) and parameters, with options for full or simple paginators, enabling efficient content display without manual link construction. Image manipulation is managed by the Image Manipulation class, which supports resizing, cropping, rotating, watermarking, and format conversion using underlying libraries like or . Key methods include resize() with width/height constraints, crop() for specific dimensions, and save() with quality settings, applied after loading images via file paths or streams, allowing dynamic processing for thumbnails or optimizations in content-heavy sites. These libraries are typically loaded and used within controller methods to process requests and responses efficiently.

Helpers and Utilities

Helpers in CodeIgniter are procedural functions grouped into files that provide reusable utilities for common web development tasks, such as URL manipulation, form handling, and text processing. Unlike libraries, which are object-oriented classes, helpers consist of simple, standalone functions that can be loaded on demand to assist in views, controllers, or models without requiring instantiation. This design promotes lightweight integration, allowing developers to include only the necessary functions for specific operations. CodeIgniter 4 includes several built-in helpers tailored to everyday needs. The URL Helper offers functions for generating links, creating slugs, and managing site URLs, such as base_url() for retrieving the application's base URL and url_title() for converting strings into SEO-friendly slugs by transliterating characters and replacing spaces with separators. For instance, url_title("What's wrong with CSS?", '-', true) produces "whats-wrong-with-css", which is ideal for URL segments in blog posts or product pages. The HTML Helper simplifies markup generation with functions like img() for image tags and ul() for unordered lists, enabling quick creation of structured HTML elements while handling attributes and escaping. The Form Helper streamlines form creation and validation support, including form_open() to generate secure opening tags with CSRF protection when enabled, which automatically sets the action to the base URL and adds hidden fields. An example usage is echo form_open('/user/register');, which outputs <form action="https://example.com/user/register" method="post"> along with a CSRF token if configured. For text and string operations, the Text Helper provides utilities like character_limiter() to truncate strings while preserving words and random_string() for generating secure tokens or passwords, such as random_string('alnum', 16) yielding a 16-character alphanumeric string. The Date Helper handles time-related tasks, offering functions like now() to get the current Unix timestamp and mdate() for formatting dates according to custom patterns, e.g., mdate('%Y-%m-%d', now()) returns the current date in YYYY-MM-DD format. To use helpers, load them via the global helper() function anywhere in the application, such as helper('url'); in a controller or view to make all functions available. Multiple helpers can be loaded at once with helper(['form', 'url']);. For frequent use, enable autoloading in app/Config/Autoload.php by adding names to the $helpers array, like $helpers = ['url', 'form'];, ensuring they are globally accessible without explicit calls. Customization allows developers to extend or create helpers by placing PHP files in the app/Helpers/ directory, where each file contains related functions prefixed with the helper name for namespacing. For example, a custom my_helper.php file might define my_custom_function($input) for specialized string processing, loaded via helper('my'); and used directly as my_custom_function($data). This approach integrates seamlessly with core helpers and libraries, such as combining Form Helper functions with validation libraries for robust input handling.

Development Process

Installation and Setup

CodeIgniter 4 requires PHP version 8.1 or newer to ensure compatibility with its features and security standards. Note that PHP 8.1 reaches end of life on December 31, 2025, and upgrading to PHP 8.2 or later is recommended for continued security updates. Database interactions require the appropriate PHP extensions for the chosen driver, such as the mysqli extension for , with support for databases such as 5.1+, 7.4+, SQLite3, 2012+, and 12.1+. Required extensions include intl and mbstring. Optional extensions like may be needed for specific functionalities such as HTTP requests, but they can be enabled via the php.ini file if required. Installation can be performed manually or via Composer, with the latter recommended for easier dependency management and updates in version 4 and later. For manual installation, download the latest release from the official GitHub repository at https://github.com/CodeIgniter4/framework/releases/latest and extract the files to serve as the project root directory. The extracted structure includes key directories such as app for application development, public as the web-accessible document root, system containing the core framework (which should not be modified), tests for testing, and writable for logs and cache. To install via Composer, which requires Composer 2.0.14 or later, execute the command composer create-project codeigniter4/appstarter project-root in the terminal, optionally specifying a version like 4.6.3; for production environments, follow with composer install --no-dev to exclude development dependencies. After installation, set up the directory structure by ensuring the web server points to the public folder as the document root to enhance security by restricting access to sensitive files. For URL rewriting to enable clean URLs without index.php, place an .htaccess file in the public directory with standard Apache mod_rewrite rules, such as those provided in the framework's documentation example:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/&#36;1 [L]
This configuration routes all requests through the index.php entry point. Basic configuration involves editing files in the app/Config directory, primarily App.php, to tailor the application to the environment. Set the $baseURL property to the site's base path, such as 'http://localhost:8080/' (including a trailing slash), which can also be overridden via the .env file with app.baseURL = 'http://example.com/'. Generate and set an encryption key in the .env file using encryption.key = 'your-32-character-key-here' to secure features like sessions and CSRF protection. Other initial settings in App.php include $indexPage = '' to hide index.php in URLs (requiring the .htaccess setup) and $uriProtocol = 'REQUEST_URI' for URI detection. Ensure the writable directory has appropriate permissions for the web server user to allow writing logs and cache files. To verify the installation, use the built-in development server by navigating to the project root and running php spark serve in , which starts the application at http://:8080. Accessing this displays the default Welcome Controller page, confirming that CodeIgniter is properly installed and configured; if issues arise, run php spark phpini:check (available since 4.5.0) to validate settings against requirements.

Creating Applications

Developing web applications with CodeIgniter follows a structured centered on its Model-View-Controller (MVC) pattern, enabling developers to map URLs to specific handlers, manage data interactions, and render outputs efficiently. After initial setup, the process begins with configuring to define how incoming requests are directed to controllers, ensuring clean and customizable URLs without exposing underlying file structures. Routing is configured in the app/Config/Routes.php file, where the $routes object from the RouteCollection class allows mapping URIs to controller methods using HTTP verbs like GET or POST. For instance, a basic route for the homepage might be defined as $routes->get('/', 'Home::index');, directing requests to the index method in the Home controller. Custom URLs can incorporate placeholders for dynamic segments, such as $routes->get('product/(:num)', 'Catalog::productLookupByID/$1');, which captures numeric IDs and passes them to the controller for processing specific products. This setup supports RESTful patterns and auto-routing improvements in CodeIgniter 4, simplifying URI-to-controller associations while allowing overrides for complex applications. Controllers form the core of request handling, residing in the app/Controllers directory and requiring the App\Controllers namespace. They typically extend the BaseController class to inherit built-in features like request and response management, as shown in this example for a simple Helloworld controller:
php
<?php

namespace App\Controllers;

class Helloworld extends BaseController
{
    public function index()
    {
        return 'Hello World!';
    }
}
The index() method serves as the default entry point, invoked when no specific method is specified in the URI; additional methods, like comment(), can be added and accessed via segments such as /helloworld/comment. In a practical application, a controller might load models for data retrieval and pass results to views, integrating seamlessly with routing to handle user requests. Models handle database interactions and are placed in the app/Models directory, extending the CodeIgniter\Model class with a namespace like App\Models. Essential properties include $table for the target database table and $allowedFields for mass assignment protection, as in this NewsModel example:
php
<?php

namespace App\Models;

use CodeIgniter\Model;

class NewsModel extends Model
{
    protected $table = 'news';
    protected $allowedFields = ['title', 'slug', 'body'];

    public function getNews($slug = false)
    {
        if ($slug === false) {
            return $this->findAll();
        }

        return $this->where(['slug' => &#36;slug])->first();
    }
}
This model supports CRUD operations natively: findAll() retrieves all records, find($id) fetches a specific row, insert($data) adds new entries, update($id, $data) modifies existing ones, and delete($id) removes records, all leveraging the Query Builder for secure queries. Views, stored in app/Views, use PHP for templating and emphasize security through functions like esc() to prevent XSS attacks, as seen in a news list view:
php
<h2><?= esc($title) ?></h2>
<?php if ($news_list !== []): ?>
    <?php foreach ($news_list as $news_item): ?>
        <h3><?= esc($news_item['title']) ?></h3>
        <div class="main"><?= esc($news_item['body']) ?></div>
        <p><a href="/news/<?= esc($news_item['slug'], 'url') ?>">View article</a></p>
    <?php endforeach ?>
<?php endif ?>
Controllers load these s via view('news/index', $data);, passing arrays of model-retrieved data for dynamic rendering. For a sample blog application, such as a site, the workflow integrates forms, validation, and CRUD operations to manage content. A controller method like create() in News handles form submissions, applying validation rules via the Validation library:
php
$validationRules = [
    'title' => 'required|min_length[3]|max_length[255]',
    'body'  => 'required|min_length[10]|max_length[5000]'
];

if (! $this->validate($validationRules)) {
    return [view](/page/View)('news/create', ['errors' => &#36;this->validator->getErrors()]);
}

$model = new \App\Models\NewsModel();
$data = [
    'title' => $this->request->getPost('title'),
    'slug'  => url_title($this->request->getPost('title'), '-', true),
    'body'  => &#36;this->request->getPost('body')
];

$model->insert($data);
This validates required fields with length constraints, repopulating the form view (news/create.php) with errors or set_value() for retention if invalid; on success, it generates a slug and inserts the record using the model's insert() method. Reading operations, like listing articles, involve the model’s getNews() to fetch data, which is then displayed in views, while updates and deletes follow similar patterns with update() and delete(). Forms incorporate CSRF protection via csrf_field() to mitigate security risks. Debugging is facilitated through error logging and the Debug Toolbar, which replaces the legacy Profiler class. Logging is managed in app/Config/Logger.php, where thresholds determine error levels captured in daily files under writable/logs, such as SQL queries via database events. The Debug Toolbar, enabled by default in development mode (via CI_ENVIRONMENT=development), displays benchmarks, executed queries, HTTP requests, and logs at the page bottom, configurable through app/Config/Toolbar.php to include or exclude collectors like timers or security checks. This real-time visibility aids in identifying performance bottlenecks or data issues during development.

History

Origins and Early Development

CodeIgniter was originally developed by , the CEO of EllisLab, Inc., as a lightweight to enhance developer productivity in building web applications. The framework drew heavily from EllisLab's existing codebase for its content management system, ExpressionEngine, incorporating class libraries, helpers, and subsystems to ensure real-world performance and efficiency. Inspired by the rapid development principles of , CodeIgniter was designed to minimize while providing a simple, flexible structure for developers. EllisLab created CodeIgniter in 2005–2006 primarily as an internal tool to support the development of ExpressionEngine and other projects, addressing the need for a fast, minimalistic alternative amid the rise of more complex frameworks. The first public version, 1.0, was released on February 28, 2006, emphasizing simplicity and speed to enable quicker prototyping and deployment compared to heavier contemporaries like CakePHP. This focus on developer-friendly features, such as straightforward configuration and minimal learning curve, positioned CodeIgniter as an accessible option for small to medium-sized projects. Early adoption of CodeIgniter was driven by its reputation for simplicity and performance, attracting developers frustrated with the overhead of more feature-heavy available at the time. Under the leadership of Rick Ellis and the EllisLab team, including contributions from the ExpressionEngine development group, the quickly gained traction through its open-source release and mechanisms like the Reactor Team. By prioritizing conceptual ease over exhaustive functionality, CodeIgniter established itself as a practical tool for real-world in its formative years.

Ownership Changes

On July 9, 2013, EllisLab announced it was seeking a new owner for CodeIgniter due to shifting company resources and priorities that limited its ability to maintain the framework adequately. In October 2014, the (BCIT) acquired CodeIgniter from EllisLab, with the intent to use it as an educational tool for students while sustaining its development as a community-driven project. By October 2019, the CodeIgniter Foundation was established as a non-profit to take ownership of the , ensuring its separate from academic or commercial entities. These transitions marked a progression toward open-source , empowering broader participation in and contributions to foster long-term sustainability.

Version Timeline

CodeIgniter's development has progressed through four major version series, each introducing enhancements to its MVC architecture, , and compatibility with evolving standards. The initial 1.x series laid the foundation for the framework's core libraries and routing system. Subsequent releases built upon this base, with 2.x emphasizing refinements under EllisLab's stewardship, 3.x shifting to community-driven maintenance with improved session handling, and 4.x adopting modern PHP practices like dependency management.

Version 1.x (2006–2010)

The 1.x series marked CodeIgniter's debut, focusing on establishing a lightweight MVC framework with essential libraries for database interactions, form handling, and routing. Released starting with 1.0 on February 28, 2006, it quickly evolved through iterative updates to address early bugs and add foundational features like support in v1.3.1 (April 11, 2006) and direct segment passing to controllers in v1.4.1 (September 21, 2006). Subsequent releases, including v1.5 (October 2006), v1.6 (March 2007), and v1.7 series (October 2008–December 2010), with final minor update v1.7.3, introduced Active Record query building, model support, and enhanced caching mechanisms, all while maintaining compatibility with 4.x and early 5.x versions. These versions prioritized simplicity and speed, forming the core structure used in production applications during the mid-2000s. Support for 1.x effectively ended around 2012 with the stabilization of v2.x, rendering it incompatible with modern without significant modifications.

Version 2.x (2011–2015)

Launched with v2.0.0 in January 2011, the 2.x series under EllisLab introduced performance optimizations and security enhancements, such as the addition of CUBRID and PDO database drivers, tools, and TLS/SSL support for SMTP in v2.1.0 (November 14, 2011). It addressed vulnerabilities like improved XSS filtering and removed insecure functions like xor_encode() in v2.2.0 (June 5, 2014). Later updates, including v2.2.1 (January 22, 2015) for timezone accuracy in helpers and v2.2.6 (October 31, 2015) fixing XSS vectors in the Security Library, focused on stabilizing the framework for 5.1.6+ environments. This series represented the last major development under EllisLab, emphasizing while bolstering defenses against common web threats. Official support concluded on October 31, 2015, after which no further updates were provided.

Version 3.x (2015–2022)

Transitioning to British Columbia Institute of Technology (BCIT) oversight, v3.0.0 debuted on March 30, 2015, requiring PHP 5.2.4+ and introducing driver-based session storage (files, database, Redis, Memcached), an Encryption Library, and a shift to the MIT license. It defaulted to the MySQLi driver and enhanced Unicode support in helpers. The series progressed with v3.1.0 (July 26, 2016) dropping PHP 5.2 support for 5.6+, adding SQLite3 drivers and batch operations in Query Builder. Security patches dominated later releases, such as v3.1.9 (June 12, 2018) fixing session fixation issues and v3.1.12 (March 3, 2022) adding WebP image support and PHP 8 compatibility. Requiring PHP 5.6+ from v3.1 onward, it emphasized robust database handling and form validation. Maintenance mode continues to provide security updates as of November 2025, with the latest version being 3.1.13.

Version 4.x (2019–present)

Initiated with the first stable release v4.0.0 on February 24, 2020, under the CodeIgniter Foundation, this series adopted a modular namespace-based structure, Composer integration for dependencies, and required PHP 7.4+. It featured PSR-4 autoloading, entity classes for data handling, and improved CLI tools via the Spark command-line interface. Ongoing development includes v4.1.x (2021) enhancing PHP 7.3+ support before dropping it, v4.5.0 (April 7, 2024) requiring PHP 8.1+ and refining caching and validation, and the 4.6.x series (starting January 19, 2024, with v4.6.0) adding enhanced CLI capabilities and bug fixes up to v4.6.3 (August 2, 2024). As of November 2025, v4 remains actively maintained, with the latest release being 4.6.3 (August 2024), and integrations like Shield for authentication updated in July 2025 (v1.2.0), ensuring compatibility with PHP 8.1+ and modern web standards. No end-of-life date has been announced for the series.

Licensing and Community

License Evolution

CodeIgniter's licensing began with versions 1.x and 2.x under a proprietary /BSD-style developed by EllisLab, which permitted commercial use, modification, and redistribution provided that users included the license agreement, retained copyright notices, acknowledged CodeIgniter in derived product documentation, and obtained permission to use the "CodeIgniter" name in product titles. This license emphasized attribution and protected EllisLab's branding while allowing broad application in proprietary projects. With the release of version 3.0 in 2015, stewardship transferred to the (BCIT), which adopted the to replace the previous terms, offering greater permissiveness by requiring only the retention of the copyright and permission notices in copies or substantial portions of the software. The under BCIT, effective from 2014 to 2019, granted users freedom to use, copy, modify, merge, publish, distribute, sublicense, and sell the software without additional attribution obligations beyond the notice itself, and disclaimed all warranties. As of 2025, CodeIgniter continues under the , with copyright held jointly by BCIT (2014–2019) and the CodeIgniter Foundation (2019–present), maintaining the same core terms of no and unrestricted use for any purpose subject to notice retention. The CodeIgniter Foundation, established in 2019, oversees the project's development, ensuring community-driven updates and maintenance. This evolution from the EllisLab to MIT has reduced restrictions on naming, documentation acknowledgments, and permission requirements, facilitating easier integration into diverse projects and broader community contributions.

Popularity and Adoption

CodeIgniter reached its peak popularity during the , when it was one of the leading frameworks due to its simplicity and speed, powering a significant portion of web applications at the time. By 2025, it has settled into the fourth most popular framework position, trailing behind , , and Yii, according to multiple developer surveys and rankings. This ranking reflects its enduring appeal for lightweight development, though adoption has declined amid the rise of more feature-rich alternatives like . The 's strengths lie in its for and suitability for projects, evidenced by its historical usage across over 1.4 million websites, including more than 332,000 active sites as of 2025. Active provide ongoing , fostering discussions and for users worldwide. resources further bolster its ecosystem, including comprehensive official documentation and the CodeIgniter 4 repository with over 4,000 , alongside numerous third-party extensions that enhance functionality without adding complexity. Despite the dominance of full-featured frameworks, CodeIgniter persists in niches valuing minimal overhead. Its decline stems largely from the shift toward ecosystems offering robust , , and support out-of-the-box. Adoption remains strong in educational settings for teaching fundamentals and among small businesses for and maintenance of cost-effective applications.

References

  1. [1]
    Welcome to CodeIgniter
    CodeIgniter is a powerful PHP framework with a very small footprint, built for developers who need a simple and elegant toolkit to create full-featured web ...Download · Learn · Discuss · Contribute
  2. [2]
    Welcome to CodeIgniter4 — CodeIgniter 4.6.3 documentation
    ### Summary of CodeIgniter History, Development, and Key Characteristics
  3. [3]
    Change Log — CodeIgniter 3.1.13 documentation
    Jan 3, 2013 · Version Beta 1.0¶. Release Date: February 28, 2006. First publicly released version. Next Previous. © Copyright 2019 - 2022, CodeIgniter ...
  4. [4]
    Your Favorite PHP Framework, CodeIgniter, Has a New Home | Blog
    Oct 6, 2014 · Their impressive BCIT School of Computing and Academic Studies teaches CodeIgniter to 150 students a year. ... codeigniter@ellislab.com 971.238.Missing: history | Show results with:history
  5. [5]
    bcit-ci/CodeIgniter: Open Source PHP Framework ... - GitHub
    CodeIgniter is an Application Development Framework - a toolkit - for people who build web sites using PHP. Its goal is to enable you to develop projects ...
  6. [6]
    Download Discuss Sources Translations User Guide - CodeIgniter
    CodeIgniter 4 is the latest version of the framework, intended for use with PHP 8.1+ (including 8.4). The initial release was February 24, 2020.
  7. [7]
    Welcome to CodeIgniter4 — CodeIgniter 4.6.3 documentation
    CodeIgniter is a PHP full-stack web framework that is light, fast, flexible and secure. It is an Application Development Framework - a toolkit - for people who ...
  8. [8]
  9. [9]
    RESTful Resource Handling — CodeIgniter 4.6.3 documentation
    CodeIgniter makes it easy to create RESTful APIs for your resources, with its resource routes and ResourceController.
  10. [10]
    Helper Functions — CodeIgniter 4.6.3 documentation
    Unlike most other systems in CodeIgniter, Helpers are not written in an Object Oriented format. They are simple, procedural functions. Each helper function ...
  11. [11]
    Server Requirements — CodeIgniter 4.6.3 documentation
    PHP 8.4 requires CodeIgniter 4.6.0 or later. PHP 8.3 requires CodeIgniter 4.4.4 or later. PHP 8.2 requires CodeIgniter 4.2.11 or later.
  12. [12]
    CodeIgniter URLs — CodeIgniter 4.6.3 documentation
    Apache Web Server . Apache must have the mod_rewrite extension enabled. If it does, you can use a .htaccess file with some simple rules.Missing: compatibility | Show results with:compatibility
  13. [13]
    Security — CodeIgniter 4.6.3 documentation
    ### Summary of Security Library Features in CodeIgniter
  14. [14]
    Models, Views, and Controllers — CodeIgniter 4.6.3 documentation
    CodeIgniter uses the Model, View, Controller (MVC) pattern to organize the files. This keeps the data, the presentation, and flow through the application as ...
  15. [15]
    Model-View-Controller — CodeIgniter 3.1.13 documentation
    CodeIgniter is based on the Model-View-Controller development pattern. MVC is a software approach that separates application logic from presentation.
  16. [16]
    Benefit of using MVC - GeeksforGeeks
    Apr 15, 2023 · A major advantage of the MVC pattern is that it simplifies the testing process by a great deal. It makes it easier to debug large-scale ...
  17. [17]
    Build Your First Application — CodeIgniter 4.6.3 documentation
    This tutorial is intended to introduce you to the CodeIgniter4 framework and the basic principles of MVC architecture.
  18. [18]
    Running Your App — CodeIgniter 4.6.3 documentation - GitHub Pages
    A CodeIgniter 4 app can be run in a number of different ways: hosted on a web server, using virtualization, or using CodeIgniter's command line tool for ...
  19. [19]
    Autoloading Files — CodeIgniter 4.6.3 documentation - GitHub Pages
    CodeIgniter provides a very flexible autoloader that can be used with very little configuration. It can locate individual namespaced classes that adhere to PSR ...
  20. [20]
    URI Routing — CodeIgniter 4.6.3 documentation - GitHub Pages
    CodeIgniter has two kinds of routing. One is Defined Route Routing, and the other is Auto Routing. With Defined Route Routing, you can define routes manually.
  21. [21]
    IncomingRequest Class — CodeIgniter 4.6.3 documentation
    The IncomingRequest class provides an object-oriented representation of an HTTP request from a client, like a browser.
  22. [22]
    HTTP Responses — CodeIgniter 4.6.3 documentation
    ### Summary of Response Class in CodeIgniter 4
  23. [23]
    Configuration — CodeIgniter 4.6.3 documentation
    CodeIgniter configuration files define simple classes where the required settings are public properties.Missing: components | Show results with:components
  24. [24]
    Events — CodeIgniter 4.6.3 documentation - GitHub Pages
    CodeIgniter's Events feature provides a means to tap into and modify the inner workings of the framework without hacking core files.
  25. [25]
    Library Reference — CodeIgniter 4.6.3 documentation
    Library Reference · Caching Driver · Cookies · Cross-Origin Resource Sharing (CORS) · CURLRequest Class · Email Class · Encryption Service · Working with Files · File ...Missing: in | Show results with:in
  26. [26]
    Working with Databases — CodeIgniter 4.6.3 documentation
    CodeIgniter comes with a full-featured and very fast abstracted database class that supports both traditional structures and Query Builder patterns.Query Builder Class · Connecting to a Database · Generating Query Results
  27. [27]
    Query Builder Class — CodeIgniter 4.6.3 documentation
    CodeIgniter gives you access to a Query Builder class. This pattern allows information to be retrieved, inserted, and updated in your database with minimal ...
  28. [28]
    Database Configuration — CodeIgniter 4.6.3 documentation
    CodeIgniter has a config file that lets you store your database connection values (username, password, database name, etc.).
  29. [29]
    Validation — CodeIgniter 4.6.3 documentation - GitHub Pages
    CodeIgniter provides a comprehensive data validation class that helps minimize the amount of code you'll write.
  30. [30]
    Session Library — CodeIgniter 4.6.3 documentation
    The Session class permits you to maintain a user's “state” and track their activity while they browse your site.
  31. [31]
    Cookies — CodeIgniter 4.6.3 documentation - GitHub Pages
    To help you efficiently send cookies to browsers, CodeIgniter provides the CodeIgniter\Cookie\Cookie class to abstract the cookie interaction.
  32. [32]
    Email Class — CodeIgniter 4.6.3 documentation
    Email Class . CodeIgniter's robust Email Class supports the following features: Multiple Protocols: Mail, Sendmail, and SMTP.
  33. [33]
    Working with Uploaded Files — CodeIgniter 4.6.3 documentation
    CodeIgniter makes working with files uploaded through a form much simpler and more secure than using PHP's $_FILES array directly.
  34. [34]
    Pagination — CodeIgniter 4.6.3 documentation
    CodeIgniter provides a very simple, but flexible pagination library that is simple to theme, works with the model, and capable of supporting multiple paginators ...
  35. [35]
    Image Manipulation Class — CodeIgniter 4.6.3 documentation
    CodeIgniter's Image Manipulation class lets you perform the following actions: The following image libraries are supported: GD/GD2, and ImageMagick.
  36. [36]
    URL Helper — CodeIgniter 4.6.3 documentation
    Returns the full URL of the page being currently viewed. When returning string, the query and fragment parts of the URL are removed.
  37. [37]
    HTML Helper — CodeIgniter 4.6.3 documentation
    Lets you create HTML <link> elements. This is useful for stylesheet links, as well as other links. The parameters are href, with optional rel, type, title, ...
  38. [38]
    Form Helper — CodeIgniter 4.6.3 documentation
    Creates an opening form tag with a site URL built from your Config\App::$baseURL. It will optionally let you add form attributes and hidden input fields.Missing: bootstrap | Show results with:bootstrap<|control11|><|separator|>
  39. [39]
    Text Helper — CodeIgniter 4.6.3 documentation
    Generates a random string based on the type and length you specify. Useful for creating passwords or generating random hashes.
  40. [40]
    Installation — CodeIgniter 4.6.3 documentation
    CodeIgniter has two supported installation methods: manual download, or using Composer. Which is right for you?
  41. [41]
    Manual Installation — CodeIgniter 4.6.3 documentation
    This is the installation technique closest to that described for CodeIgniter 3. Installation Download the latest version, and extract it to become your project ...
  42. [42]
    Composer Installation — CodeIgniter 4.6.3 documentation
    Composer can be used in two ways to install CodeIgniter4 on your system. Important CodeIgniter4 requires Composer 2.0.14 or later.Manual Installation · Running Your App · Change Logs
  43. [43]
    Controllers and Routing — CodeIgniter 4.6.3 documentation
    CodeIgniter4 Overview Application Structure Models, Views, and Controllers Autoloading Files Services Factories Working with HTTP Requests Security GuidelinesRequest Class · Auto Routing (Improved) · HTTP Messages
  44. [44]
    Controllers — CodeIgniter 4.6.3 documentation
    ### Summary of Building Controllers in CodeIgniter 4
  45. [45]
    Using CodeIgniter's Model - GitHub Pages
    The CodeIgniter's Model provides convenience features and additional functionality that people commonly use to make working with a single table in your database ...Using Entity Classes · Managing Databases · Validation
  46. [46]
    News Section — CodeIgniter 4.6.3 documentation
    ### Summary of CodeIgniter News Section Tutorial
  47. [47]
    Create News Items — CodeIgniter 4.6.3 documentation
    The validation_list_errors() function provided by the Form Helper is used to report errors related to form validation. The csrf_field() function creates a ...<|separator|>
  48. [48]
  49. [49]
    Credits — CodeIgniter 3.1.13 documentation
    CodeIgniter was originally developed by Rick Ellis (CEO of EllisLab, Inc.). The framework was written for performance in the real world, with many of the class ...Missing: 2005 2006
  50. [50]
    What is CodeIgniter? What are the top 11 reasons to use it? - Olibr
    Sep 6, 2023 · 2006, CodeIgniter was created by EllisLab as a response to the complexity of existing PHP frameworks. ; 2006, Version 1.0 was released, providing ...
  51. [51]
    EllisLab Seeking New Owner for CodeIgniter - Expression Engine
    Jul 9, 2013 · We are seeking a new home for CodeIgniter. Our objective is to do what is best for the framework and its community, so we are willing to consider a variety of ...Missing: internal tool 2005 2006
  52. [52]
    The CodeIgniter Foundation is finally here.
    Oct 23, 2019 · We have some exciting news, CodeIgniter now has a new owner, the not for profit and newly formed CodeIgniter Foundation. Created by EllisLab ( ...
  53. [53]
    Credits — CodeIgniter 4.6.3 documentation - GitHub Pages
    In 2014, CodeIgniter was acquired by the British Columbia Institute of Technology and was then officially announced as a community-maintained project. In ...Missing: BCIT | Show results with:BCIT
  54. [54]
    Change Log : CodeIgniter User Guide
    Change Log. Version 2.2.6. Release Date: October 31, 2015. Security. Fixed an XSS attack vector in Security Library method xss_clean() .
  55. [55]
  56. [56]
    CodeIgniter Version - EDUCBA
    Apr 6, 2023 · ... CodeIgniter Version. Introduction ... EllisLab and the other one is Reactor updated by the community. It had sub releases ...
  57. [57]
    Codeigniter version 1.0 to current
    Feb 7, 2015 · CodeIgniter 1.0 was released in October 2012 and reached end-of-life support in June 2014. Using older PHP versions is strongly discouraged due ...Missing: history | Show results with:history
  58. [58]
    CodeIgniter 2 EOL - October 2015
    We are no longer considering feature requests for CodeIgniter 2, but will continue to provide security fixes until Oct 31st, 2015 - the EOL date for CI2.
  59. [59]
    Has CI3 reached end of life? - CodeIgniter Forums
    Sep 13, 2024 · What is the official status of CI3? Are there any plans for future releases for eg. security issues or PHP compatibility?
  60. [60]
  61. [61]
    CodeIgniter at a Glance : CodeIgniter User Guide
    CodeIgniter is licensed under an Apache/BSD-style open source license so you can use it however you please. ... CodeIgniter · Copyright © 2006 - 2014 · EllisLab ...
  62. [62]
    Licensing Question - CodeIgniter Forums
    Mar 10, 2009 · 1.A copy of this license agreement must be included with the distribution. 2.Redistributions of source code must retain the above copyright ...Missing: type | Show results with:type
  63. [63]
    CodeIgniter License Agreement
    CodeIgniter License Agreement. Copyright (c) 2008 – 2011, EllisLab, Inc. All rights reserved. This license is a legal agreement between you and EllisLab Inc.
  64. [64]
    CodeIgniter 3 Will be Released Under the MIT License
    Oct 27, 2014 · The project repository will be updated over the next while, to reflect the licensing. All needed changes will be in place before CodeIgniter 3 ...Missing: history | Show results with:history
  65. [65]
  66. [66]
    The MIT License (MIT) — CodeIgniter 4.6.3 documentation
    Aug 2, 2025 · The MIT License (MIT) . Copyright (c) 2014-2019 British Columbia Institute of Technology. Copyright (c) 2019-present CodeIgniter Foundation.
  67. [67]
    The Rise and Fall of CodeIgniter and Symfony: Is It Time to Switch to ...
    Sep 23, 2024 · CodeIgniter and Symfony, once titans in the PHP framework landscape, have experienced a notable decline in popularity over recent years.
  68. [68]
    PHP Framework Popularity: 2024 - 2025 Breakdown - devabit
    The PHP framework popularity trend continues to rise due to its flexibility, security, and ease of use, making it a preferred choice for developers worldwide.
  69. [69]
    Top 10 Best PHP Frameworks in 2025 [Complete Guide] - Cloudways
    Jun 17, 2025 · The article walks you through the top 10 best PHP frameworks. It will help you decide which is the right PHP framework for your next ...
  70. [70]
    The State of PHP 2025 – Expert review - The JetBrains Blog
    Oct 15, 2025 · No major shifts occurred in framework adoption: Laravel continues to lead with 64% usage, followed by WordPress (25%) and Symfony (23%). Other ...
  71. [71]
    CodeIgniter Usage Statistics - BuiltWith Trends
    Get a list of 344,449 websites using CodeIgniter which includes location information, hosting data and contact details. The list includes 326,092 live websites ...Missing: peak | Show results with:peak
  72. [72]
  73. [73]
    Top 10 PHP Frameworks in 2025 (Updated) - Rollbar
    Jun 13, 2025 · Top 10 PHP Frameworks in 2025 (Updated) · Laravel · Symfony · CodeIgniter · CakePHP · Yii · Laminas · Phalcon · Slim.Symfony · Codeigniter · Faqs
  74. [74]
    Is CodeIgniter Still Relevant in 2025? - DEV Community
    Dec 26, 2024 · Yes, but don't take my word for it, it is very much still relevant if you know where it fits. For small teams, beginners, or legacy applications, it remains a ...
  75. [75]
    CodeIgniter Development Facts to know - Kanhasoft
    Sep 9, 2025 · E-commerce, fintech, education, healthcare, and SMEs across the USA, UK, UAE, Israel, and India rely heavily on CodeIgniter for web apps and ...