Codeigniter 4 Install / Download using Composer or Manually

Codeigniter 4 install or download using composer or manually. This example will show you step by step on how to install & download Codeigniter 4 project using the composer. As well as, run the downloaded project.

This example will show you how to install codeigniter 4 using composer, git and manually in xampp.

How to Install Codeigniter 4 using Composer

  • Step 1 – Install / Download Composer
  • Step 2 – Check Composer
  • Step 3 – Install / Download Codeigniter
  • Step 4 – Check Installation

Step 1 – Install / Download Composer

Go to the browser and hit the following URL in your browser https://getcomposer.org/download/

And download and install the composer on your system. Then follow the following below steps.

Check out this tutorial, how to install composer in window.

Step 2 – Check Composer

In this step, Open the command prompt/terminal

composer

Step 3 – Install / Download Codeigniter 4

In this step, There are 3 ways to download and install Codeigniter 4.

The first way to install or download Codeigniter 4

Go to Codeigniter’s official website and download and extract Codeigniter’s new setup and your local webserver environment.

The second way to install or download Codeigniter 4

In this step, you need to open your command prompt and run the following command for creating a Codeigniter project name “first-CodeIgniter-4”.

composer create-project codeigniter4/appstarter  first-CodeIgniter-4  -s rc 

Now, you will update dependency using below command. Whenever there is a new release, then from the command line in your project root:

composer update

The Third way to install or download Codeigniter 4

In the third step, you can download or install the codeigniter 4 using git.

git remote add upstream https://github.com/codeigniter4/CodeIgniter4.git 

Step 4 – Check Installation

Next, you will run the download project, let’s open the terminal so go to

cd C:\Xampp\htdocs\first-CodeIgniter-4 

Run the following command

php spark serve 

OR

php spark serve --port=8081 

OR

php -S localhost:3000

After run the above command, go to browser and hit url http://localhost:8000/ or http://localhost:8081/ or http://localhost:3000/

Conclusion

In this Codeigniter 4 tutorial – you have learned successfully how to install or download the CodeIgniter 4 using the composer, git and manual.

Leave a Comment