Setting different development environment


  • Create two folders ‘local’ and ‘production’ inside application/config.
  • Copy config.php and database.php in both folders recently created.
  • In application/config/local/config.php, you can set base url http://localhost/mysite
  • Similarly, in application/config/production/config.php, you can set base url
  • Define CI_ENV in index.php. In above screenshot, CI_ENV has been set to local
  • Similary, we can define database configuration separately in local and production folder

Thank you and Good luck 🙂


Leave a Reply

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