In this tutorial, I am going to download and install Codeigniter in xampp. We will explain how to install Codeigniter on xampp server. So you can follow the next step to install or configure Codeigniter. Xampp and Codeigniter Setup: First thing we are going to do is setup Xampp for those who want to use codeigniter with xampp. So go ahead and download either portable version or developer version of xampp. Install it in the directory (and drive) as per your choice. Once you copy all the files of xampp in directory, find the start.bat file to. Install XAMPP or WAMP; Download and Unzip the package from Codeigniter.com; Extract all the document in the server space (htdocs or www directory) Mac Environment. Install MAMP; Download and Unzip the package from Codeigniter.com; Extract all the document in the server space (htdocs) Linux Environment. Download and Unzip the package from. Install CodeIgniter in XAMPP First download codeigniter latest version and extract its contents to the 'htdocs' folder of XAMPP. Rename the folder to some application name such as 'cidemo'. Codeigniter Install. Codeigniter Install: Steps to install Codeigniter. Unzip it at your server in folder “codeigniter”. For example: xampp/htaccess.
- Download Codeigniter 4
- Php Codeigniter
- Codeigniter Installation In Xampp Free
- Codeigniter How To Install
- Codeigniter Xampp Tutorial
Database migration is one of the best features that you get in any PHP framework. Database migration in the framework is just like a version control of your database tables. And another feature of migration is that you don’t have to send or put separate database file to other developers.
Codeigniter also comes with builtin migration feature and we are going to learn how to steup and run database migration
First let’s have a fresh copy of codeigniter from its site. You are unfamiliar with codigniter installation, no worries you can check my post how to install codeigniter in XAMPP.
By default migration is disabled in codeigniter. You have to enable it by going to
Create Migration Folder:
Next thing is to create a migrations folder in the application folder. Remember name of the folder must be in plural no singular.
Ways to create Migration File(s):
There are 2 ways to create a migration file. Means name of the file should be in following 2 ways.
- Sequential: Migration file name should start with 001. Each number should start with 3 digits and there must not be any gaps in the sequence.
- Timestamp: Each migration is numbered using the timestamp and format must be YYYYMMDDHHIISS (e.g. 20181208100537)
By default, timestamp is set to migration type. But you can change this by going to
config/migration.php file and set
$config['migration_type'] value from
In this tutorial, I will be using a sequential type.
Create Migration File:
Migration file must extend
CI_Migration class and class will have 2 functions. One is
up() and second is
down(). Up function will have table creation code and down function will get drop table code.
$this->dbforge is a database manage class which will take care of database. You can visit Database Forge Class for further digging.
Now let’s create a migration for users table. I am creating a file in
application/migrations folder as
Download Codeigniter 4
config/migration.php and set
$config['migration_version'] value to
Now create a migration controller in
controllers folder. I will create
Migration.php and write below code.
defined('BASEPATH')ORexit('No direct script access allowed');
Before running migration make sure you have already setup your database in
config/database.php file. Now go to browser and type
localhost/your_project/migration/index. If all goes well, migrations and users table will create in database.
More from WDB24.com
Codeigniter Installation In Xampp Free
Codeigniter Install : Steps to install Codeigniter.
Step by Step Codeigniter Installation Process
1. Download Latest Version 3.0.0 : Download Zip
2. Unzip it at your server in folder “codeigniter”. for example : xampp/htaccess/codeigniter
Codeigniter How To Install
3. Now go to – application/config/config.php Here add base url ie. Base path of your application directory.
For example :
Codeigniter Xampp Tutorial
War thunder m4a5. 4. Now to go the : application/config/database.php Add database settings here :
For Example :
5 . (Optional) : Remove Index.php from url
Create a .htaccess file at the root of the application for example at : xampp/htaccess/codeigniter – add here .htaccess file
Add the following code in the .htaccess file :
6. You are done : Now your application is ready : Hit the url : http://localhost/codeigniter you will see default welcome message