Codeigniter 4 - Installation
Before installing codeigniter 4 in our system we need to do some setup first.
- Make sure composer is installed in your system.
- PHP version 7.2 or newer is required.
- Xampp is installed in your system, local development environment bundle.
- extension=intl is enabled(remove the semicolon before it) in your system, located /xampp/php/php.ini file
Now steps to follow for fresh installation
- Open your command prompt
- Navigate to htdocs directory e.g. D:\xampp\htdocs>(Web root folder).
- Issue command: composer create-project codeigniter4/appstarter myproject.
- D:\xampp\htdocs>composer create-project codeigniter4/appstarter myproject.
- It will install all dependency files and folders for development for project myproject.
Now we successfully installed codeigniter 4 with project name myproject inside htdocs
Now test the instatllation
CodeIgniter comes with a simple command that takes advantage of PHP’s built-in server to get you up and running fast on your development machines.
Type the following on the command line from the root of your project:
D:\xampp\htdocs\myproject>php spark serve
Now point your browser to the correct URL you will be greeted by a welcome screen. Try it now by heading to the following URL:
and you should be greeted by the following page:
It means your application working , start building something different !! congrats ..