Vinit Kumar

'No' does not mean never, only not now !!!.

Last update On 19 Feb 24 Posted By Vinit

CodeIgniter 4 Configuration and Installation

CodeIgniter Comes in three flavors: CodeIgniter 3 (Current), CodeIgniter 4 (Future) and CodeIgniter 2 (Legacy)

CodeIgniter is a lightweight Framework (Released in 2006). CodeIgniter is very easy to install, within half an hour you can run your program by CodeIgniter. It works nicely on almost all Shared and Dedicated hosting Platforms.Currently required PHP version is

Server Requirements:

PHP version 7.0.15 or newer is required, with intl extension installed.

Database is required in almost all web application, for the CI4 the database requirement is:

  • MySQL(5.1+) via the MySQLi driver
  • PostgreSQL via the Postgre driver


Manual Installation:

You can download the file from the official website of Codeigniter, please click HERE to download the CI4 file.


1) Upload the unzip file to your local machine or server. In CI4 , the index.php file will be in public folder inside project root.The Big Change to the previous version is that there is now a public directory, for the security related reason it is necessary for separation of application/Framework and public (JS, CSS, Images etc). The document root will no longer be placed in the root directory of CodeIgniter, but Now in the public Folder.

2) For setting the base URL, session , encryption key etc you will need to open the App.php file for configuration. Open the application/Config/App.php file with any text editor and set your base URL.

3) For the setting database Configuration, open the application/Config/Database.php with any text Editor and set your database setting. For the security reason, both the system and any application can be placed above the web root so that they are not directly accessible via any browser. If anyone wants to keep there view file public, it is also possible in CI4 via move the view directory from application directory to corresponding folder inside the public directory. After this you need to open your main index.php file and set the $system_path, $application_folder and $view_folder variables preferably full path (eg: /www/domain/system). Stay tuned to learn how CI4 works in my next blog... Thank you

Created date 11 Sep 19
Blog Category