CodeIgniter Installation

CodeIgniter Installation is so simple and easy. CodeIgniter Installation steps are given below.

  1. Download CodeIgniter lastest version Download
  2. Extract it inside "C:\xampp\htdocs" for xampp OR "C:\wamp\www" for wampp.
  3. Open the application/config/config.php file and set your base URL to your localhost path.
  4. $config['base_url'] = "http://localhost/CodeIgniter_2.2.0/";
  5. open the application/config/database.php and set your database settings.
  6. $db['default']['hostname'] = 'localhost';
    $db['default']['username'] = 'root';
    $db['default']['password'] = '*****';
    $db['default']['database'] = 'codeignitertutorial';
  7. To remove index.php from the Url we create a .htaccess file with the following contents and save the ".htaccess" file within the web root directory.
  8. RewriteEngine on
    RewriteCond $1 !^(index\.php|images|robots\.txt)
    RewriteRule ^(.*)$ /index.php/$1 [L]
  9. Open the file application/config/autoload.php to auto-load the database library so we don’t need to load the database manually in every model.we need to do as add database to the array as a string.
  10. $autoload['libraries'] = array('database');

Now we are ready to work with CodeIgniter.we have to visit the following Url in our web browser.


We should be greeted with the following message.