{"id":4325,"date":"2019-04-27T07:06:03","date_gmt":"2019-04-27T01:36:03","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=4325"},"modified":"2026-10-21T17:19:48","modified_gmt":"2026-10-21T11:49:48","slug":"how-to-load-multiple-databases-in-codeigniter-framework","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/how-to-load-multiple-databases-in-codeigniter-framework\/","title":{"rendered":"How to Configure and Load Multiple Database Connections in CodeIgniter"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Post Date:<\/strong> April 26, 2019<br><strong>Last Updated:<\/strong> October 21, 2026<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/codeigniter.com\/userguide3\/\" target=\"_blank\" rel=\"noopener\">CodeIgniter<\/a> is a PHP framework that provides a database abstraction layer for connecting applications to databases and executing queries. Some applications need to connect to multiple databases to manage separate data sources, support legacy systems, or retrieve information from different databases within the same application.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, an application might use one database to store user information and another to manage reports, transactions, or historical records.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">CodeIgniter supports multiple database connections through its database configuration file. By defining separate connection groups, developers can load and use the required database connection from controllers, models, or other application components.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before proceeding, ensure that you have:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>PHP installed with the required database extensions.<\/li>\n\n\n\n<li>A working CodeIgniter 3 application.<\/li>\n\n\n\n<li>Access to the application&#8217;s <code>application\/config\/database.php<\/code> file.<\/li>\n\n\n\n<li>Two databases that are accessible from your application server.<\/li>\n\n\n\n<li>Database credentials with the required permissions.<\/li>\n\n\n\n<li>Basic knowledge of PHP and SQL.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The examples below use MySQL with the <code>mysqli<\/code> database driver. Adjust the hostname, database names, usernames, and passwords to match your environment.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Implementation<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Locate the Database Configuration File<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">CodeIgniter 3 stores its database connection settings in:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">application\/config\/database.php<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Open this file and locate the default database configuration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A typical configuration contains the following settings:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>hostname<\/code>: Database server hostname or IP address.<\/li>\n\n\n\n<li><code>username<\/code>: Database account used for authentication.<\/li>\n\n\n\n<li><code>password<\/code>: Password for the database account.<\/li>\n\n\n\n<li><code>database<\/code>: Name of the database to access.<\/li>\n\n\n\n<li><code>dbdriver<\/code>: Database driver, such as <code>mysqli<\/code>.<\/li>\n\n\n\n<li><code>pconnect<\/code>: Whether to use persistent connections.<\/li>\n\n\n\n<li><code>db_debug<\/code>: Whether database errors are displayed.<\/li>\n\n\n\n<li><code>char_set<\/code>: Character set used for database communication.<\/li>\n\n\n\n<li><code>dbcollat<\/code>: Database connection collation.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">These settings define how CodeIgniter connects to a database.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Configure the First Database Connection<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Assume the application uses a database named <code>form<\/code> as its primary database.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Configure the default connection in <code>application\/config\/database.php<\/code>:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$db['default'] = array(\n    'dsn'      => '',\n    'hostname' => 'localhost',\n    'username' => 'app_user',\n    'password' => 'your_secure_password',\n    'database' => 'form',\n    'dbdriver' => 'mysqli',\n    'dbprefix' => '',\n    'pconnect' => FALSE,\n    'db_debug' => (ENVIRONMENT !== 'production'),\n    'cache_on' => FALSE,\n    'cachedir' => '',\n    'char_set' => 'utf8',\n    'dbcollat' => 'utf8_general_ci',\n    'swap_pre' => '',\n    'encrypt'  => FALSE,\n    'compress' => FALSE,\n    'stricton' => FALSE,\n    'failover' => array(),\n    'save_queries' => TRUE\n);<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace the example credentials with the actual database credentials. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For production applications, configure database error handling so that internal connection details and SQL errors are not exposed to end users.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Configure the Second Database Connection<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To connect to another database, add a second configuration group in the same file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, the second database is named <code>db2<\/code>.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$db['database2'] = array(\n    'dsn'      => '',\n    'hostname' => 'localhost',\n    'username' => 'app_user',\n    'password' => 'your_secure_password',\n    'database' => 'db2',\n    'dbdriver' => 'mysqli',\n    'dbprefix' => '',\n    'pconnect' => FALSE,\n    'db_debug' => (ENVIRONMENT !== 'production'),\n    'cache_on' => FALSE,\n    'cachedir' => '',\n    'char_set' => 'utf8',\n    'dbcollat' => 'utf8_general_ci',\n    'swap_pre' => '',\n    'encrypt'  => FALSE,\n    'compress' => FALSE,\n    'stricton' => FALSE,\n    'failover' => array(),\n    'save_queries' => TRUE\n);<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You now have two named connection groups:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>default<\/code> \u2014 connects to the <code>form<\/code> database.<\/li>\n\n\n\n<li><code>database2<\/code> \u2014 connects to the <code>db2<\/code> database.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Both configurations use <code>pconnect =&gt; FALSE<\/code>, which avoids requesting persistent database connections. Persistent connections are not required for multiple database access.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the databases are hosted on different servers, specify the appropriate hostname and credentials for each connection.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Load the Second Database Connection<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">After configuring the connection groups, load the second database using CodeIgniter&#8217;s database loader.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, create or open a controller at:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">application\/controllers\/DatabaseTest.php<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add the following code:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?php\ndefined('BASEPATH') OR exit('No direct script access allowed');\n\nclass DatabaseTest extends CI_Controller\n{\n    public function index()\n    {\n        \/\/ Load the default database connection.\n        $this->load->database();\n\n        \/\/ Load the second database connection.\n        $db2 = $this->load->database('database2', TRUE);\n\n        \/\/ Test the second database connection.\n        $query = $db2->query('SELECT DATABASE() AS database_name');\n\n        if ($query) {\n            $result = $query->row();\n\n            echo 'Connected database: '\n                . htmlspecialchars($result->database_name);\n        } else {\n            echo 'Unable to execute the database query.';\n        }\n    }\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The important statement is:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$db2 = $this->load->database('database2', TRUE);<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The first argument specifies the database configuration group. The second argument, <code>TRUE<\/code>, tells CodeIgniter to return the database connection object instead of assigning it to the default database property.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can then use <code>$db2<\/code> to execute queries against the second database.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Query Both Databases<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Once both connections are available, you can execute queries against each database independently.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ Query the default database.\n$query1 = $this->db->query(\n    'SELECT DATABASE() AS database_name'\n);\n\n\/\/ Load and query the second database.\n$db2 = $this->load->database('database2', TRUE);\n\n$query2 = $db2->query(\n    'SELECT DATABASE() AS database_name'\n);\n\nif ($query1 &amp;&amp; $query2) {\n    echo 'First database: '\n        . htmlspecialchars($query1->row()->database_name);\n\n    echo '&lt;br>';\n\n    echo 'Second database: '\n        . htmlspecialchars($query2->row()->database_name);\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>$this-&gt;db<\/code> property represents the default connection when it has been loaded. The <code>$db2<\/code> variable represents the second connection.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For production applications, handle database connection and query failures through appropriate logging and application error handling rather than displaying raw database errors.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 6: Use Multiple Connections in a Model<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For better code organization, database operations can be placed in a model.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create the following file:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">application\/models\/Report_model.php<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Example:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?php\ndefined('BASEPATH') OR exit('No direct script access allowed');\n\nclass Report_model extends CI_Model\n{\n    private $report_db;\n\n    public function __construct()\n    {\n        parent::__construct();\n\n        $this->report_db = $this->load->database(\n            'database2',\n            TRUE\n        );\n    }\n\n    public function get_reports()\n    {\n        return $this->report_db\n            ->get('reports')\n            ->result();\n    }\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This example assumes that the <code>db2<\/code> database contains a table named <code>reports<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Load and use the model from a controller:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$this->load->model('Report_model');\n\n$reports = $this->Report_model->get_reports();<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This approach separates database access logic from the controller and makes the application easier to maintain.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 7: Verify the Database Connections<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Test each connection independently before using it in production.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can run the following query against a connection to verify which database is selected:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">SELECT DATABASE();<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can also check whether the database connection is available:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$db2 = $this->load->database('database2', TRUE);\n\nif ($db2->conn_id) {\n    echo 'Database connection initialized.';\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A successfully initialized connection does not guarantee that every query will succeed. Verify that the database exists, the credentials are valid, and the account has permission to access the required tables.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For remote databases, also verify network connectivity, firewall rules, and database server access settings.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 8: Avoid Unnecessary Framework Core Modifications<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The original tutorial proposes modifying:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">system\/database\/DB_driver.php<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">by adding the following line inside the <code>simple_query()<\/code> method:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$this->db_select();<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This modification should not be required for standard CodeIgniter 3 multiple database connections when the named connection groups are configured and loaded correctly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Avoid changing framework core files unless a specific, verified defect requires a controlled patch. Core modifications can be overwritten during upgrades and may introduce unexpected behavior.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the second connection fails, check the configuration group name, database credentials, server access permissions, and the connection-loading method before considering framework-level changes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">CodeIgniter 3 supports multiple database connections through named configuration groups in <code>application\/config\/database.php<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By defining separate connections and loading them with <code>$this-&gt;load-&gt;database('database2', TRUE)<\/code>, developers can query different databases within the same application without unnecessarily modifying framework core files.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For maintainable applications, keep database operations in models or dedicated data-access components, use least-privilege database accounts, protect credentials, and handle errors securely.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Version note:<\/strong> This tutorial focuses on CodeIgniter 3. CodeIgniter 4 uses a different database configuration and connection-management approach, so its implementation should follow the CodeIgniter 4 documentation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Frequently Asked Questions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Can CodeIgniter connect to multiple databases?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. CodeIgniter 3 supports multiple database connections through named configuration groups in <code>application\/config\/database.php<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. How do I load the second database in CodeIgniter 3?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use the following statement:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$db2 = $this->load->database('database2', TRUE);<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>database2<\/code> value must match the configuration group defined in <code>application\/config\/database.php<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Can the two databases be hosted on different servers?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. Each connection group can have its own hostname, credentials, database name, and other connection settings. Ensure that the application server can reach both database servers and that their access controls permit the connections.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4. Is it necessary to set <code>pconnect<\/code> to <code>TRUE<\/code>?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. Persistent connections are not required to connect to multiple databases. Use <code>FALSE<\/code> unless persistent connections are specifically required and appropriate for your deployment.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5. Do I need to modify <code>DB_driver.php<\/code> to use multiple databases?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Normally, no. Use CodeIgniter&#8217;s supported database loader and configure each connection group correctly. Modifying core framework files can create maintenance and compatibility issues.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">6. Can I use different database types in the same application?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">CodeIgniter can support different database drivers where the framework version, PHP extensions, and required database features are compatible. Verify driver support and query compatibility for the specific databases involved.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">7. How can I troubleshoot a failed second database connection?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Check the connection group name, hostname, port, username, password, database permissions, required PHP extensions, and network connectivity. Review server-side logs without exposing sensitive database details to users.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">8. Does the same approach work in CodeIgniter 4?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. CodeIgniter 4 uses a different configuration structure and database connection API. Follow the official documentation for your installed version.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Official Links<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/codeigniter.com\/userguide3\/\" target=\"_blank\" rel=\"noopener\">CodeIgniter Official Documentation<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/codeigniter.com\/userguide3\/database\/configuration.html\" target=\"_blank\" rel=\"noopener\">CodeIgniter 3 Database Configuration<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/codeigniter.com\/userguide3\/database\/connecting.html\" target=\"_blank\" rel=\"noopener\">CodeIgniter 3 Connecting to Multiple Databases<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/codeigniter.com\/userguide4\/\" target=\"_blank\" rel=\"noopener\">CodeIgniter 4 User Guide<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Related Articles<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/how-to-add-google-recaptcha-in-php-codeigniter\/\">How to add Google ReCAPTCHA in PHP Codeigniter<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/how-to-debug-in-codeigniter\/\">How to debug in Codeigniter<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Need Assistance with CodeIgniter Development?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Configuring multiple database connections requires careful handling of credentials, database permissions, query execution, and application architecture. <a href=\"https:\/\/pheonixsolutions.com\/\" data-type=\"link\" data-id=\"https:\/\/pheonixsolutions.com\/\">Pheonix Solutions<\/a> can assist with PHP application development, CodeIgniter integration, database configuration, performance optimization, and troubleshooting.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you need assistance implementing multiple database connections or maintaining your CodeIgniter application, <a href=\"https:\/\/pheonixsolutions.com\/contact\/\" data-type=\"link\" data-id=\"https:\/\/pheonixsolutions.com\/contact\/\">contact Pheonix Solutions<\/a> to discuss your requirements.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Post Date: April 26, 2019Last Updated: October 21, 2026 Introduction CodeIgniter is a PHP framework that provides a database abstraction [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1022],"tags":[605,632],"class_list":["post-4325","post","type-post","status-publish","format-standard","hentry","category-web-architecture","tag-codeigniter-framework","tag-load-multiple-databases","psol-cat-web-architecture"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-17L","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=4325"}],"version-history":[{"count":1,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4325\/revisions"}],"predecessor-version":[{"id":12427,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4325\/revisions\/12427"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=4325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=4325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=4325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}