Latest in branch 4
4.7.3
Released 22 May 2026
(3 days ago)
SoftwareCodeIgniter
Branch4
Supported
PHP versions
PHP 8.1+
Initial release4.0.0
23 Feb 2020
(6 years ago)
Latest release4.7.3
22 May 2026
(3 days ago)
Support statusYes
Source codehttps://github.com/codeigniter4/CodeIgniter4/tree/4.0.0
Documentationhttps://www.codeigniter.com/user_guide/intro/index.html
Downloadhttps://codeigniter.com/user_guide/installation/index.html
CodeIgniter 4 ReleasesView full list
SEE ALSO: PHP MySQL

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

VersionRelease date
4.7.322 May 2026
(3 days ago)
4.7.224 Mar 2026
(2 months ago)
4.7.122 Mar 2026
(2 months ago)
4.7.001 Feb 2026
(3 months ago)
4.6.501 Feb 2026
(3 months ago)
4.6.412 Dec 2025
(5 months ago)
4.6.302 Aug 2025
(9 months ago)
4.6.226 Jul 2025
(9 months ago)
4.6.102 May 2025
(1 year ago)
4.6.019 Jan 2025
(1 year ago)
4.5.819 Jan 2025
(1 year ago)
4.5.731 Dec 2024
(1 year ago)
4.5.628 Dec 2024
(1 year ago)
4.5.507 Sep 2024
(1 year ago)
4.5.427 Jul 2024
(1 year ago)
4.5.325 Jun 2024
(1 year ago)
4.5.210 Jun 2024
(1 year ago)
4.5.114 Apr 2024
(2 years ago)
4.4.807 Apr 2024
(2 years ago)
4.5.007 Apr 2024
(2 years ago)
4.4.729 Mar 2024
(2 years ago)
4.4.624 Feb 2024
(2 years ago)
4.4.527 Jan 2024
(2 years ago)
4.4.428 Dec 2023
(2 years ago)
4.4.327 Oct 2023
(2 years ago)
4.4.220 Oct 2023
(2 years ago)
4.4.105 Sep 2023
(2 years ago)
4.3.825 Aug 2023
(2 years ago)
4.4.025 Aug 2023
(2 years ago)
4.3.730 Jul 2023
(2 years ago)
4.3.618 Jun 2023
(2 years ago)
4.3.521 May 2023
(3 years ago)
4.3.427 Apr 2023
(3 years ago)
4.3.326 Mar 2023
(3 years ago)
4.3.218 Feb 2023
(3 years ago)
4.3.114 Jan 2023
(3 years ago)
4.3.010 Jan 2023
(3 years ago)
4.2.1209 Jan 2023
(3 years ago)
4.2.1121 Dec 2022
(3 years ago)
4.2.1006 Nov 2022
(3 years ago)
4.2.931 Oct 2022
(3 years ago)
4.2.830 Oct 2022
(3 years ago)
4.2.706 Oct 2022
(3 years ago)
4.2.604 Sep 2022
(3 years ago)
4.2.528 Aug 2022
(3 years ago)
4.2.413 Aug 2022
(3 years ago)
4.2.306 Aug 2022
(3 years ago)
4.2.205 Aug 2022
(3 years ago)
4.2.116 Jun 2022
(3 years ago)
4.2.003 Jun 2022
(3 years ago)
4.1.925 Feb 2022
(4 years ago)
4.1.824 Jan 2022
(4 years ago)
4.1.709 Jan 2022
(4 years ago)
4.1.603 Jan 2022
(4 years ago)
4.1.508 Nov 2021
(4 years ago)
4.1.406 Sep 2021
(4 years ago)
4.1.305 Jun 2021
(4 years ago)
4.1.217 May 2021
(5 years ago)
4.1.101 Feb 2021
(5 years ago)
4.0.531 Jan 2021
(5 years ago)
4.1.031 Jan 2021
(5 years ago)
4.0.415 Jul 2020
(5 years ago)
4.0.330 Apr 2020
(6 years ago)
4.0.224 Feb 2020
(6 years ago)
4.0.124 Feb 2020
(6 years ago)
4.0.023 Feb 2020
(6 years ago)
4.0.0-rc.406 Feb 2020
(6 years ago)
4.0.0-rc.319 Oct 2019
(6 years ago)
4.0.0-rc.2.128 Sep 2019
(6 years ago)
4.0.0-rc.2b28 Sep 2019
(6 years ago)
4.0.0-rc.226 Sep 2019
(6 years ago)
4.0.0-rc.102 Sep 2019
(6 years ago)
4.0.0-beta.425 Jul 2019
(6 years ago)
4.0.0-beta.306 May 2019
(7 years ago)
4.0.0-beta.101 Mar 2019
(7 years ago)
4.0.0.0-alpha.530 Jan 2019
(7 years ago)
4.0.0-alpha.415 Dec 2018
(7 years ago)
4.0.0-alpha.515 Dec 2018
(7 years ago)
4.0.0-alpha.330 Nov 2018
(7 years ago)
4.0.0-alpha.226 Oct 2018
(7 years ago)
4.0.0-alpha.128 Sep 2018
(7 years ago)