# Setting Up CodeIgniter - Basics

In this post I’ll show how to set up CodeIgniter in a way that your code and configuration (passwords!) are safe. It will involve moving the “system” and “application” outside the (public) document root.

Seperating both <em>system</em>' and application’ has obvious advantages for maintainance and for reusibility. Using a seperate www’ directory enables you to publish all your application specific JS/CSS and other public files.

# Doctrine Meets CodeIgniter

Anyone who has made websites in the past has encountered it. The endless bugging typing of SQL queries, always doing the same over and over again. This struggle is lightened by the use of frameworks or even complete CM-Systems. However, SQL query writing is still often needed.

To counter this (and other annoying pestering little details mongering), Object Relational Mappers were invented. Doctrine is a PHP implementation of the RoR ORM. And now it’s quite easy to merge CodeIgniter and Doctrine into one package.