Best Resources to Learn CodeIgniter

CodeIgniter (CI) is a PHP MVC framework with a very small footprint, built for developers who need a simple and elegant toolkit to create full-featured web applications. It contains libraries, a simple interface, and a logical structure to access these libraries, plug-ins, helpers, and some other resources which can help developers create web apps easily.

Tutorials and Courses

  • Youtube videos – A comprehensive series of tutorials on CodeIgniter.
  • phptpoint – A list of tutorials that will help you be able to develop your project faster as Codeigniter Framework provides a rich set of libraries for commonly needed tasks, also a logical structure, and a simple interface to access these libraries.
  • PHP MVC Framework CodeIgniter Tutorial for Beginners Project – Learn how to create websites using CodeIgniter and integrate common features such as Authentication, and managing data.
  • Getting Started With a Simple Example – An example of how to use Controller, Model, and View to display news.
  • CodeIgniter From Scratch – a 17-part, video series that focuses exclusively on the CodeIgniter PHP framework. You will learn how to use some libraries such as File, Calendar, Shopping Cart, and Security.
  • Alex Lancer’s CodeIgniter 4 Tutorials – CodeIgniter 4 is the upcoming version of the framework, intended for use with PHP 7.2. These videos made by Alex Lancer will help you keep up with the latest version before it comes out.

CRUD Generators

  • Grocery CRUD – Grocery CRUD is an open-source library that makes a developer’s life easier. Few simple lines of code and you can create a full stable CRUD with nice views. A completely automatic system that even a newbie in PHP can work with!
  • CRUDigniter allows you to automatically create complete Codeigniter CRUD for your database tables, with form validation rules, column associations, and form controls.
  • CodeIgniter CRUD Generator – This premium plugin will help developers to create Add, and Edit Pages ( with Modal, View, Controller), search, sort by field, pagination, Export CSV/PDF, and important features are one to many & many to many relationships

Best CodeIgniter Libraries

  • ion_auth – This is the most popular authentication library for CodeIgniter, developed by Ben Edmunds.
  • CI-Breadcrumb – Breadcrumb library for CodeIgniter 3.x.x.
  • SmartGrid for CodeIgniter – SmartGrid focus on data display than data manipulation. We are starting with limited features to make the code very simple and robust, yet we will be adding more features on the go.
  • CodeIgniter Redis – A CodeIgniter interface for the Redis data store. This library tries to adhere to the defined protocol, including responses.
  • Memcached Library for CodeIgniter – This library is to help interface between a CodeIgniter-based project and 1 or more Memcached Servers 
  • CodeIgniter-Google-Maps-V3-API-Library – The library enables you to create a map and overlay multiple markers, polylines, polygons, rectangles, ground overlays, and/or circles, all of which are fully customizable. 
  • CodeIgniter Recaptcha – An easy-to-use CodeIgniter library to work with reCAPTCHA version 2.0 a.k.a NO CAPTCHA reCAPTCHA.
  • CodeIgniter-Unzip – Extract ZIP files in CodeIgniter without installing any PECL extensions for PHP.
  • Forensics CodeIgniter – Forensics is a high-powered, completely customizable replacement for the CodeIgniter Profiler.
  • CodeIgniter Minify – Minify CSS and js files.
  • CodeIgniter-Instagram-API – CodeIgniter 3.x library to interact with the Instagram API
  • Refinery – Refinery is an extension and a command line interface of the Migrations Class for the Codeigniter framework.
  • Twiggy – Twiggy is not just a simple implementation of the Twig template engine for CodeIgniter. It supports themes, layouts, and templates for regular apps and also for apps that use HMVC (module support).
  • Luthier CI – Improved routing, middleware support, authentication tools, and more for CodeIgniter 3 framework

CMSs & Starter Kits

  • Ionize CMS – Ionize is a free professional and natively multilingual PHP CMS, developed with user experience in mind. Ionize is dedicated to web designers and web agencies.
  • Fuelcms – FUEL CMS is a CodeIgniter-based content management system. Content editors love FUEL CMS for its good looks and charm. Developers love it for being open and thoughtful.
  • Codefight CMS – Codefight CMS is based on CodeIgniter Framework – Open source PHP web application framework, which is very easy to learn. The latest version will have multiple website managers. The new version is almost ready and is in staging for testing purpose before its official release.
  • Bonfire – It’s a CI3 springboard to build off of with many of the tools you wish you had on projects but never took the time to build.
  • Hoosk – Hoosk is a lightweight, user-focused Content Management System (CMS) built in CodeIgniter which can be used to create stylish responsive websites with ease!
  • PusakaCMS – Pusaka CMS is a file-based Content Management System built on top of CodeIgniter 3 Framework.
  • Open Blog – A blog platform written in CI.
  • CodeIgniter Bootstrap – Combines Twitter Bootstrap and CodeIgniter together with many useful functions and libraries, allowing you to start programming your idea and skip the starting phase of web development.
  • CodeIgniter Skeleton – A ready-to-use CodeIgniter skeleton with tons of new features and a whole new concept of hooks (actions and filters) as well as a ready-to-use and application-free themes and plugins system.
  • My Igniter – Codeigniter starter kit with HMVC + ReactJs + Twig.

Blog Posts

When deploying a CodeIgniter 3 HMVC application to a server with PHP running, you will encounter an error about string. A PHP Error was encountered Severity: 8192 Message: strpos(): Non-string needles will be interpreted as strings in the future. Use...
If you have a blog in which you’d like to use the title of your entries in the URL, you need to convert them to URL slugs. CodeIgniter's built-in library offers a method to help us with this task. URL...
Retrieving the id of the latest inserted record is a common task. We need to use the id for other related tables. CodeIgniter's Query Builder class offers a simple method to get the latest id. We only need to call...
Duplicating a record based on an id allows you to quickly make a copy of an existing record, and then make only necessary changes without having to enter all the data from scratch. This is especially useful in situations where...
CodeIgniter provides a comprehensive form validation and data prepping class that helps developers make form submission easier. Among the rule, is_unique is a useful one to check whether a field exists in the database. is_uniqueYesReturns FALSE if the form element...

Sitemap is a basic SEO tool for any website. It can be used to submit to search engines, which allows search engines to crawl and index your website's content. Here are steps to create a dynamic sitemap Step 1: Create...
Faker is a popular PHP library that can be used in any PHP framework like CodeIgniter to generate dummy data for development or testing purposes. Faker can be used to bootstrap database and XML documents, and fill in your persistence...
In this article, we will discuss how to get and post data from a controller in CodeIgniter and provide some examples of how to use the GET and POST methods to get and post data from a controller. Following are...
CodeIgniter's Query Builder class has support to get several results without getting all results. Use PHP count() method This is commonly used if we want to get both results' data and the number of data sets in the results. $this->db->select('*');...
We use global variables in CodeIgniter so we can access it anywhere, be it in controller, model, or view. There are several ways to declare global variables in CodeIgniter. Library You can create a file in application/libraries. Its class constructor...
There are 4 basic operations associated with entities - Create, Read, Update, and Delete. They are called CRUD for short. For example, an e-commerce website has a Product entity, which means the user can add a new product (Create), list...
Are you a web developer looking for a powerful and lightweight Content Management System (CMS) that allows you to quickly create great websites and web applications? An open-source CMS like CodeIgnitor is an ideal choice for both experienced and beginner...
In some CodeIgniter projects, connecting to multiple databases to read different data types is required. Fortunately, CodeIgniter provides an easy way to carry this task out. To use more than one database, you just need to declare a new element...
Uploading multiple files is a common task in web development, and CodeIgniter is an easy-to-use PHP framework that makes it possible to upload multiple files with ease. CodeIgniter has a wide range of features and tools to help simplify the...
These libraries will help you start and develop a website using CodeIgniter faster and more efficiently. Third-Party Libraries Ion Auth 2 – This library is a go-to library for Auth System. It is used in many popular CodeIgnitor CMSes. Biostall Google...


Validate form fields with $this->form_validation->set_rules()

It is recommended to use Codeigniter’s built-in form validation features, which provide you with the methods to set rules, run validations and display messages. They are easy to use as well.

$this->form_validation->set_rules('username', 'Username', 'required');
$this->form_validation->set_rules('username', 'Username', 'required|min_length[8]|is_unique[users.username]');

Sanitize your inputs

Sanitizing user’s inputs before updating the data to the database is an important part. It helps prevent exploits and hacks.

It can be done by field

$username = $this->security->xss_clean($username);

or by global

$config['global_xss_filtering'] = TRUE;

Prevent Cross-Site Request Forgery (CSRF)

CodeIgniter offers CSRF protection via a setting. It helps protect the site from CSRF attacks.

You can enable this feature in config.php file.

$config['csrf_protection'] = TRUE;

Remove index.php from the URLs

By default CodeIgniter has index.php in a part of a controller’s URL. It doesn’t look nice and it makes the URL longer yet unnecessary.

We can remove it in the config file

$config['index_page'] = ""; //old value is index.php

and in the .htaccess file

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.