Code your dreams into reality.
Every line of code is a step towards a better future.
Embrace the bugs, they make you a better debugger.

How to Install and Run CodeIgniter 4 in Xampp?

Last Updated on July 15, 2024 by

Download CodeIgniter 4 from the official website, and extract it to the htdocs directory, then do some configuration and run it on xampp localhost server.

Let’s start to install and run the codeIgniter 4 application in xampp localhost server:

Step 1 – Download Codeigniter 4

Visit to https://codeigniter.com/download, and download latest codeIgniter 4 version.

Step 2 – Extract Downloded Zip in Htdocs

Navigate to xampp/htdocs directory and extract the downloaded CodeIgniter archive in it, and rename the extracted folder to your project name.

Step 3 – Set Up Database

Edit application/config/database.php file, and set up database in it:


hostname=>localhost,

username=>root,

password=> ‘’,

database=>your_database_name,

Step 4 – Configure Base URL

Edit application/config/config.php file, and set the base_url to your local development environment:

$config[‘base_url’] = ‘http://localhost/your_project_name/';

Step 5 – Run Application

Open your web browser and type to http://localhost/your_project_name/ for testing.

Leave a Comment