by Jairon Landa
In this tutorial I will show you how to setup CodeIgniter 4 using composer and run it in XAMPP.
If you still do not have XAMPP and Composer. Please download and install XAMPP and Composer in your machine.
Before we start, please check
PHP.ini to make sure the
intl extension is enabled.
Remove semicolon (
;) to enable the extension.
composer create-project codeigniter4/appstarter --no-dev
Note: This command will not install phpunit and composer dependencies
no-dev – Only framework and trusted dependencies being composer install.
The command will create
appstarter folder. You can rename whatever you want. In this tutorial I rename the
mysite-project folder, enter command:
Paste the following snippet to
httpd-vhosts.conf file and save it.
Restart XAMPP Apache to take effect the configuration.
Next, edit Hosts file. To permit
ci4site.test run in browser.
Notepad.exe (Run as Administrator).
File > Open and navigate
Windows > System32 > drivers > etc
Open the hosts file and add
127.0.01 ci4site.test line at the bottom host file and save the host file.
Open browser and check http://ci4site.test
It should show like this
You learn how to setup CodeIgniter 4 with composer and configure host file to set local domain and run project in XAMPP.
Backend and Frontend developer, a.k.a full-stack developer.Kg Bundung, Tuaran