4.6.4

Latest release in branch 4
Released 26 days ago (December 12, 2025)

Software CodeIgniter
Branch 4
First official release version 4.0.0
First official release date 5 years ago (February 23, 2020)
Supported
PHP versions
PHP 8.1+
Documentation https://www.codeigniter.com/user_guide/intro/index.html
Download https://codeigniter.com/user_guide/installation/index.html
CodeIgniter 4 Releases View full list

What is new in CodeIgniter 4

CodeIgniter 4 is a complete rewrite of the framework, not just a simple version update. It was built from the ground up to comply with modern PHP standards and practices. While it retains the lightweight and fast performance that CodeIgniter is known for, the architecture has changed significantly to offer better security and modularity. The framework now relies on namespaces, strict autoloading, and a command-line interface to help developers build robust applications.

Server Requirements

Because CodeIgniter 4 uses modern PHP features, the hosting requirements have changed compared to previous versions. It requires a more recent version of PHP and specific extensions enabled on the server.

Requirement Details
PHP Version Requires modern PHP versions (7.4+ or 8.1+ depending on the specific release).
Required Extensions intl, mbstring, json, mysqlnd, xml, curl
Supported Databases MySQL (5.1+), PostgreSQL, SQLite3, SQLSRV

Application Structure and Security

The file structure has been reorganized to improve security. The most notable change is the introduction of a public directory. This folder acts as the web root, meaning your application code (Controllers, Models) and system files are placed outside the publicly accessible area. This prevents direct access to your core files by visitors.

  • app/ -- Contains your application code (Controllers, Models, Views).
  • public/ -- The web root containing the browser-accessible index.php and assets.
  • writable/ -- Holds temporary files like cache, logs, and session data.
  • system/ -- The core framework files.

Namespaces and Autoloading

CodeIgniter 4 fully adopts PSR-4 standards for autoloading. You no longer need to manually load libraries or models using super-objects like in previous versions. Instead, you use standard PHP namespaces to import the classes you need.

Example of a Controller using namespaces:

<?php

namespace App\Controllers;

use CodeIgniter\Controller;

class Home extends Controller { 
  public function index() { 
    return view('welcome_message'); 
  } 
}

CLI Tools with Spark

The framework now includes a built-in command-line tool called Spark. This tool helps developers perform tasks such as clearing caches, running database migrations, and creating boilerplates for controllers and models without writing files manually.

Common Spark commands:

# Start a local development server php spark serve

Create a new controller file
php spark make:controller User

Run database migrations
php spark migrate

Models and Entities

The Model class has been enhanced with automatic CRUD (Create, Read, Update, Delete) methods, soft deletes, and validation rules. Additionally, CodeIgniter 4 introduces Entities. While Models handle the database connection, Entities represent a single row of data as an object, allowing you to format data elegantly before it is saved or displayed.

// Example of finding a user with ID 15 
$userModel = new \App\Models\UserModel(); $user = $userModel->find(15);

// The result is an object (Entity) or array depending on configuration 
echo $user->email;

Environment Configuration

Configuration has become environment-aware through the use of .env files. You can create different configuration files for development, testing, and production environments. This allows you to manage database credentials and debug settings securely without modifying the core configuration files in your application code.

Releases In Branch 4

Version Release date
4.6.4 26 days ago
(December 12, 2025)
4.6.3 5 months ago
(August 02, 2025)
4.6.2 5 months ago
(July 26, 2025)
4.6.1 8 months ago
(May 02, 2025)
4.6.0 11 months ago
(January 19, 2025)
4.5.8 11 months ago
(January 19, 2025)
4.5.7 1 year ago
(December 31, 2024)
4.5.6 1 year ago
(December 28, 2024)
4.5.5 1 year ago
(September 07, 2024)
4.5.4 1 year ago
(July 27, 2024)
4.5.3 1 year ago
(June 25, 2024)
4.5.2 1 year ago
(June 10, 2024)
4.5.1 1 year ago
(April 14, 2024)
4.4.8 1 year ago
(April 07, 2024)
4.5.0 1 year ago
(April 07, 2024)
4.4.7 1 year ago
(March 29, 2024)
4.4.6 1 year ago
(February 24, 2024)
4.4.5 1 year ago
(January 27, 2024)
4.4.4 2 years ago
(December 28, 2023)
4.4.3 2 years ago
(October 27, 2023)
4.4.2 2 years ago
(October 20, 2023)
4.4.1 2 years ago
(September 05, 2023)
4.3.8 2 years ago
(August 25, 2023)
4.4.0 2 years ago
(August 25, 2023)
4.3.7 2 years ago
(July 30, 2023)
4.3.6 2 years ago
(June 18, 2023)
4.3.5 2 years ago
(May 21, 2023)
4.3.4 2 years ago
(April 27, 2023)
4.3.3 2 years ago
(March 26, 2023)
4.3.2 2 years ago
(February 18, 2023)
4.3.1 2 years ago
(January 14, 2023)
4.3.0 2 years ago
(January 10, 2023)
4.2.12 2 years ago
(January 09, 2023)
4.2.11 3 years ago
(December 21, 2022)
4.2.10 3 years ago
(November 06, 2022)
4.2.9 3 years ago
(October 31, 2022)
4.2.8 3 years ago
(October 30, 2022)
4.2.7 3 years ago
(October 06, 2022)
4.2.6 3 years ago
(September 04, 2022)
4.2.5 3 years ago
(August 28, 2022)
4.2.4 3 years ago
(August 13, 2022)
4.2.3 3 years ago
(August 06, 2022)
4.2.2 3 years ago
(August 05, 2022)
4.2.1 3 years ago
(June 16, 2022)
4.2.0 3 years ago
(June 03, 2022)
4.1.9 3 years ago
(February 25, 2022)
4.1.8 3 years ago
(January 24, 2022)
4.1.7 3 years ago
(January 09, 2022)
4.1.6 4 years ago
(January 03, 2022)
4.1.5 4 years ago
(November 08, 2021)
4.1.4 4 years ago
(September 06, 2021)
4.1.3 4 years ago
(June 05, 2021)
4.1.2 4 years ago
(May 17, 2021)
4.1.1 4 years ago
(February 01, 2021)
4.0.5 4 years ago
(January 31, 2021)
4.1.0 4 years ago
(January 31, 2021)
4.0.4 5 years ago
(July 15, 2020)
4.0.3 5 years ago
(April 30, 2020)
4.0.2 5 years ago
(February 24, 2020)
4.0.1 5 years ago
(February 24, 2020)
4.0.0 5 years ago
(February 23, 2020)
4.0.0-rc.4 5 years ago
(February 06, 2020)
4.0.0-rc.3 6 years ago
(October 19, 2019)
4.0.0-rc.2.1 6 years ago
(September 28, 2019)
4.0.0-rc.2b 6 years ago
(September 28, 2019)
4.0.0-rc.2 6 years ago
(September 26, 2019)
4.0.0-rc.1 6 years ago
(September 02, 2019)
4.0.0-beta.4 6 years ago
(July 25, 2019)
4.0.0-beta.3 6 years ago
(May 06, 2019)
4.0.0-beta.1 6 years ago
(March 01, 2019)
4.0.0.0-alpha.5 6 years ago
(January 30, 2019)
4.0.0-alpha.4 7 years ago
(December 15, 2018)
4.0.0-alpha.5 7 years ago
(December 15, 2018)
4.0.0-alpha.3 7 years ago
(November 30, 2018)
4.0.0-alpha.2 7 years ago
(October 26, 2018)
4.0.0-alpha.1 7 years ago
(September 28, 2018)