This plugin hasn’t been tested with the latest 3 major releases of WordPress. 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;


Requires PHP 5.1.6 or later.

  1. Download the plugin, and extract the files.
  2. Download CodeIgniter from and
    unpack the files.
  3. Copy the contents of the CodeIgniter folder (application folder, system folder, index.php) into the plugin’s “ci” folder.
  4. Edit the plugin’s configuration file, then upload the plugin to your plugins folder.
  5. Activate the plugin through the Plugins menu in WordPress.


Where can I find documentation on CodeIgniter?

The online manual is at CodeIgniter User Guide Version


Read all 1 review

Contributors & Developers

“WP Code Igniter” is open source software. The following people have contributed to this plugin.


Translate “WP Code Igniter” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



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