Codeigniter 4 - Installation


CodeIgniter 4 is a powerful PHP framework, I will install it via composer a PHP dependency manager, install dependency files for develeopment.

Getting Started

Before installing codeigniter 4 in our system we need to do some setup first.

Now steps to follow for fresh installation

  • Open your command prompt
  • Navigate to htdocs directory e.g. D:\xampp\htdocs>(Web root folder).
  • Issue command: composer create-project codeigniter4/appstarter myproject.
  • D:\xampp\htdocs>composer create-project codeigniter4/appstarter myproject.
  • It will install all dependency files and folders for development for project myproject.

Responsive image

Now we successfully installed codeigniter 4 with project name myproject inside htdocs

Now test the instatllation

CodeIgniter comes with a simple command that takes advantage of PHP’s built-in server to get you up and running fast on your development machines.

Type the following on the command line from the root of your project:
D:\xampp\htdocs\myproject>php spark serve

Responsive image

Now point your browser to the correct URL you will be greeted by a welcome screen. Try it now by heading to the following URL:

and you should be greeted by the following page:

Responsive image

It means your application working , start building something different !! congrats ..