This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

WP Code Igniter


Use this plugin to integrate the CodeIgniter framework into WordPress, making it available for both themes and other

This plugin emulates a CI bootstrap, without any application environment (because WordPress does that), and includes a
configuration file for setting database connection parameters.

CodeIgniter is a powerful PHP framework with a very small footprint, built for PHP coders who need a simple and elegant
toolkit to create full-featured web applications. It implements a popular application design pattern called
model-view-controller (MVC). In this case, WordPress becomes the ‘view’ instead of a CI application.

This plugin will probably work with versions of WordPress earlier than 3.2, but if you are running such an earlier
version check your version of PHP. CodeIgniter requires PHP 5.1.6 or later.

Note: This is the first version of this plugin and it has not had extensive testing. Consider it experimental and use at
your own risk.

Known Limitations

CodeIgniter functionality is not available to WordPress admin.


You can use CodeIgniter in both themes and other plugins.
Here are some simple examples of its use in a theme context.

Simple Example 1 – Database Query:

  if(defined('WP_CODE_IGNITER_DB')) {
    $res = $db->query('SELECT * FROM wp_users');
    foreach($res->result() as $row) {
      echo '<p>'.$row->user_login.'</p>';

Simple Example 2 – Pagination:

  if(defined('WP_CODE_IGNITER')) {
    class Pagination extends CI_Controller {
      public function pagelinks()
        $config['base_url'] = '';
        $config['total_rows'] = '200';
        $config['per_page'] = '20';
        echo $this->pagination->create_links();
    $pagination = new Pagination;


Where can I find documentation on CodeIgniter?

The online manual is at CodeIgniter User Guide Version


Read all 1 review



  • This is the first version. Consider it a beta release, as it has not had much testing.

Contributors & Developers

This is open source software. The following people have contributed to this plugin.


Browse the code