Installation Instructions

Before proceeding, you should first update your CodeIgniter installations MySQL Driver with the latest version from the CodeIgniter SVN.

For specific instructions on how to do this, read Troubleshooting.

DataMapper is installed in seven steps:

  1. Unzip the package.
  2. Open the application/config/datamapper.php file with a text editor and set your preferred DataMapper settings.
  3. Upload the application/config/datamapper.php file to your CodeIgniter application/config folder.
  4. Upload the application/libraries/datamapper.php file to your CodeIgniter application/libraries folder.
  5. Upload the application/languages/english/datamapper_lang.php file to your CodeIgniter application/language/english folder.
  6. Open your CodeIgniter application/config/autoload.php file with a text editor and add the database and datamapper libraries to the autoload libraries array. $autoload['libraries'] = array('database', 'datamapper'); For further information on auto-loading, read Auto-loading Resources.
  7. Open your CodeIgniter application/config/database.php file with a text editor and set your database settings, ensuring you set the dbprefix to an empty string. $db['default']['dbprefix'] = ""; For information on using table prefixes with DataMapper, read Setting up Table Prefixes.

That's it!

If you're new to DataMapper, please read the Getting Started section of the User Guide to begin learning how to use DataMapper. Enjoy!