Tag: codeigniter

  • CodeIgniter/ActiveRecord setup to use master + slave db replication

    This is how you can set up CodeIgniter to direct mysql queries to different read/write hosts in your db replicated environment, using a db_slave for your SELECT’s, and a db_master for the INSERT/UPDATE/DELETE queries. File: application/config/database.php Specify the different database hosts in the database config file: < ?php if ( ! defined(‘BASEPATH’)) exit(‘No direct script…

  • CodeIgniter development site – on live environment

    We recently had to set up a development site for an existing CodeIgniter site, and we wanted to do this effortless. Ideal would obviously be to have a separate virtual domain or a separate box but hey, “ideal” isn’t always ideal, heh. By applying the same principle as in our previous WordPress article on the…