In this article I will show how to install and setup Codeigniter 4 on localhost. First we download the Codeigniter 4 framwork and will setup on localhost environment.
- Install / Download Composer
- Check Composer
- Install / Download Codeigniter 4
- Setup Codeigniter 4
1. Install / Download Composer
Go to the browser and hit the following URL in your browser https://getcomposer.org/download/
Download the composer and follow the setup of installation.
2. Check Composer
3. Install Codeigniter 4
There are multiple ways. Using that we can download and setup Codeigniter 4.
Go to Codeigniter official website and download the files.
Extract it on your xampp folder (inside the htdocs) or wamp folder (inside the www).
B. Using Composer
In this step, we need to open command prompt and run the following command for creating a Codeigniter project name “CodeIgniter4” Or you can set your own project name.
composer create-project codeigniter4/appstarter CodeIgniter4 -s rc
Now, We will update dependency using below command. Whenever there is a new release, then from the command line in your project root:
4. Setup the project
Now we will setup the project. Create an virtual host for this project. Now rename the env file to .env. We will use this for configuration.
By default, all of the settings are commented out. If we want
to override the setting, we must un-comment it by removing the ‘#’ at the beginning of the line.
So we have successfully installed the CodeIgniter 4 on our localhost. If you have any question just drop the comment. You can use other contact mode to contact me. You can find it in on my Bio. Don’t forget to share with others.