CodeIgniter is an MVC framework used by most of the developers for web application development using PHP. It helps developers to build web applications quicker as it offers lots of helpful code libraries and helpers which help speeding up the development work in PHP.
In this article, I am going to explain the basic setup of CodeIgniter and here is the step by step process flow:
1. First of all, download the code from the official site link and choose the code version which you want to install. We should prefer one stage older than the latest version of the CodeIgniter as the latest version may be undergoing testing or up-gradation at any given stage.
2. After the code has been downloaded, unzip the package and move the code to your server or setup on the local machine on the localhost. After the code is moved, you will see index.php in your root folder.
3. Make the changes in the config.php file where all the configuration settings like base Url, encryption keys and other global variables can be done.
This file is located at application/config/config.php
4. If your code requires database access then changes have to be made in the database.php file for the database name, host, username, and password.
This file is located at application/config/database.php
5. After this setup is done, try to make your folder structure more secure by changing $system_path and $application_folder in the file with the new name in the index.php file.
6. There is an option to change the default controller in the routes.php file where it can be changed with the new controller created by you and also routing of Url is done in this file.
The file is located at application/config/routes.php
Now that the changes have been made, you are ready with your CodeIgniter to start working on regular to most tedious tasks in PHP.
Share your views/queries in comments and do share it with your friends if you find the article helpful.