Codeigniter 4 Install / Download Tutorial – In this Post, You will learn how to install & download the Codeigniter 4 project using the composer. In this tutorial, We will install the Codeigniter project and run the downloaded project.
Codeigniter can also be downloaded from the composer. Therefore it is necessary to have composer installed in your system. If your system does not have composer installed, then visit the following link to install composer:
Download the composer and follow the setup of installation.
Go to the browser and hit the following URL in your browser https://getcomposer.org/download/
Open the command prompt/terminal
There are 3 ( Manual, Composer, Git ) ways to download and install Codeigniter 4 in your system.
Go to Codeigniter’s official website and download the project and extract Codeigniter’s new setup and your local webserver environment.
In this method, you need to open your command prompt and run the following commands for installing/downloading a Codeigniter project name “first-CodeIgniter-4”.
cd/local webserver composer create-project codeigniter4/appstarter first-CodeIgniter-4 -s rc
After that, We will update dependency using the below command. Whenever there is a new release, then from the command line in your project root:
In the third method, you can download or install the Codeigniter 4 using git.
git remote add upstream https://github.com/codeigniter4/CodeIgniter4.git
You can run your downloaded project by following the instruction given below:
Run the following command
php spark serve OR php spark serve --port=8081
After running the above command, go to the browser and hit URL http://localhost:8000/ or http://localhost:8081/ or
You can hit the following URL on your browser to run your project:
http://localhost/your project name/public