3 Ways to Install Codeigniter on Windows (Complete+Pictures)
How to install CodeIgniter on windows via Composer and how to solve errors that may occur when installing the CodeIgniter framework.
Codeigniter is a very powerful php framework, but it is quite light, simple, and easy to learn. Codeigniter itself uses the MVC pattern, namely Model, View, Controller where you can separate the logic and appearance of the website that you will build with this MVC framework.
However, before you install and use Codeigniter. According to the official codeigniter site documentation, CI4 requires PHP specifications >= 7.2. If you are still using PHP version < 7.2, it is recommended to update first.
And also there are some requirements needed when installing Codeigniter 4, namely:
- intl extension
- mbstring extension.
- php-json
- php-mysqlnd
- php-xml
For those of you Windows users, you can directly open the file php.ini on XAMPP then uncomment for the extension above (will also be discussed in the middle of the tutorial).
1. Download Codeigniter4 from the Official Website
1. First, please visit the official Codeigniter website here and please download. As shown in the image below. Previously make sure the PHP version on your PC or laptop is 7.2 or above. If not, please update first.

2. Please wait a few moments until the download is complete.
3. When you’re done, you’ll get a .zip file. Please extract it first.
4. If you have extracted it, please rename the file name to ci4 or according to your wishes. As in the image below.

5. Then, please move the folder into htdocs. As in the image below. Here I use XAMPP, if you don’t use XAMPP please adjust it.

6. Done.
2. Install Through Composer
1. First, please open CMD or Command Prompt on your PC or laptop. As in the image below.

2. Then, please type the command as below
composer create-project codeigniter4/appstarter project-root// thencd project-root// thencomposer update
3. If it’s finished, please try running it. There are two options to run it.
- The first option, please open a browser on your PC or laptop. Then type
localhost/ci4
Then, please click Public. As shown in the image below.

And if your codeigniter is successful the results will look like the image below. 
- Then the second option is for you to open a terminal and type:
php spark serve
As in the image below. Don’t forget you have to be in the codeigniter folder beforehand.
Then, please open the browser and typelocalhost:8080
And if successful, it will look like the image below.

- The first option, please open a browser on your PC or laptop. Then type
4. Done.
3. Overcoming Errors When Installing Composer
When downloading Codeigniter 4 directly on the official website or via composer, and running it with php spark serve sometimes appears ext-intl error like the picture below.
Then, how to solve it?
1. How to solve ext-intl error in Windows:
1. First, please open XAMPP-Control. Then, please click config on the Apache section. As in the image below.

2. Then, please click PHP (php.ini). As in the image below.

3. Then, please Uncomment on extension extension=intl. Please remove the “semicolon” in front of it. As in the image below.

4. Then, please restart the webserver you are using.
2. How to solve ext-intl error on Linux:
- Please open the terminal.
- Then, please type
sudo apt install php-intl - And restart the web server that you are using.
3. How to solve ext-intl errors on Mac:
- For mac, you can use
brew - Please type
brew install php70-intl - Then, adjust to the php version you have, please check the php version you are using with
php -v - Then type brew install php71-intl for php 7.1
- Then, brew install php72-intl for php 7.2
- Then, brew install php73-intl for php 7.3
- And, brew install php74-intl for php 7.4
So this article discusses how to install Codeigniter on a PC or laptop. Hopefully this article can be useful and help you. Thank you

The rain lover and coffee connoisseur who likes to sit in daydream while dreaming of his dreams that will come true.
Post a Comment for "3 Ways to Install Codeigniter on Windows (Complete+Pictures)"