# 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.

The first thing we need to do is to create an checkout of the latest CodeIgniter release (currently 1.7.1) <div class=’bogus-wrapper’>

</div>

now move the application folder outside the system folder:

Now move the system and application folder to some folder outside of your public document root. Let’s call this directory <em>non-www</em>'. The documentroot directory will be called `www’.

In the root of your checkout you will find an index.php. Copy/move this file to www. Open it and look for the following lines:

Change them to the following: <div class=’bogus-wrapper’>

</div>

Now you are up and running. Probably you want something like nice url’s. For this you can use the following .htaccess

Now, go and create some new shiny sites.