CodeIgniter Installing CodeIgniter
📝 Installing CodeIgniter
🔎 Introduction
CodeIgniter is a lightweight PHP framework known for its speed and simplicity. Before you start building applications, you need to set up CodeIgniter properly on your system.
This guide covers the different installation methods:
-
Manual installation (download and extract)
-
Installation using Composer
-
Setup on XAMPP/WAMP/LAMP
📥 1. Download CodeIgniter
You can download CodeIgniter in two ways:
🔗 Official Website
-
Download the latest stable release of CodeIgniter 4 (recommended).
💻 Using Composer (Recommended)
If Composer is installed on your system:
👉 This creates a new folder project-name with CodeIgniter installed.
🗂️ 2. Folder Structure After Installation
Once extracted or installed, your CodeIgniter project will look like this:
project-name/
├── app/ # Application folder (controllers, models, views)
├── public/ # Public index.php (entry point)
├── system/ # Core framework files
├── writable/ # Cache, logs, sessions
├── .env # Environment settings
├── composer.json # Dependencies
-
app/ → Your application logic (controllers, models, views).
-
system/ → Core CodeIgniter files (do not edit).
-
public/ → The entry point (index.php).
⚙️ 3. Configure Base URL
Open app/Config/App.php and set your base URL:
If you’re using XAMPP/WAMP, it may look like:
▶️ 4. Running CodeIgniter
🔹 Using Built-in PHP Server
Navigate to your project folder and run:
👉 Your app will run at: http://localhost:8080/
🔹 Using XAMPP/WAMP
-
Place your project in the
htdocs/(XAMPP) orwww/(WAMP) folder. -
Start Apache & MySQL.
-
Access:
🛠️ 5. Verifying Installation
If installed correctly, you’ll see the CodeIgniter Welcome Page in your browser. 🎉
🚀 Alternative: Installing CodeIgniter 3
For legacy projects, you can install CodeIgniter 3:
-
Download from CodeIgniter 3 GitHub
-
Extract into your server directory.
-
Open
application/config/config.phpand set:
🎯 Conclusion
Installing CodeIgniter is simple whether you use Composer or download manually.
-
Beginners: Start with manual installation (easy setup).
-
Advanced developers: Use Composer for better dependency management.
Once installed, you can begin creating controllers, models, and views to build your first CodeIgniter application.