Codeigniter 4 Installation

In this tutorial you will learn about the Codeigniter 4 Installation and its application with practical example.

In this CodeIgniter 4 Installation tutorial, I’ll show you how to install codeigniter 4 for your web project development. Codeigniter 4 can be installed in following different ways:

  • Codeigniter 4 Manual Installation
  • Codeigniter 4 Composer Installation
  • Codeigniter 4 Installation using Git

Codeigniter 4 Manual Installation

In this section I’ll show you how to install Codeigniter 4 Manually. Go to Codeigniter’s official website and download and extract Codeigniter’s new setup and your local webserver environment.

Codeigniter 4 Composer Installation

In this section I’ll show you how to install Codeigniter 4 Using Composer. Here are the steps to download & install Composer in CodeIgniter:

Step 1) Open the following URL in your browser https://getcomposer.org/download/. Download the setup and follow the installation instructions.

Step 2) Open the command prompt/terminal and run the following command to check the composer is installed or not.

Congratulations, you have successfully installed the composer.

Step 3) Let’s create a new Codeigniter 4 Project called myFirstProject. Run the following command:

Note:- The above command will run after Codeigniter 4 latest version is successfully installed.

Codeigniter 4 Installation using Git

In this section I’ll show you how to install Codeigniter 4 using Git. if you want to install or download Codeigniter 4 using Git. Then you can download and install codeigniter 4 using the git repository. Use the following command to download and install codeigniter 4 from the git repository:

Run Codeigniter 4 Project

Now, we will run the downloaded project. Let’s open the terminal and switch to your project folder:

Now, run the project using following command:

Now, visit the following link in the browser to see the output –

http://localhost:8000/ or http://localhost:8081/ or http://localhost:3000/

In this tutorial we have learn about the Codeigniter 4 Installation and its application with practical example. I hope you will like this tutorial.