.gitignore for CodeIgniter
15 ignore rules for CodeIgniter, ready to copy into your repository.
PHP web framework
The complete .gitignore for CodeIgniter
# Generated by LFGitignore - https://lfgitignore.com
# Created: 2026-08-05 01:27:16 UTC
# Technologies: CodeIgniter
### CodeIgniter ###
*/config/development
*/logs/log-*.php
!*/logs/index.html
*/cache/*
!system/cache/*
!*/cache/index.html
!*/cache/.htaccess
user_guide_src/build/*
user_guide_src/cilexer/build/*
user_guide_src/cilexer/dist/*
user_guide_src/cilexer/pycilexer.egg-info/*
application/logs/*
!application/logs/index.html
!application/logs/.htaccess
/vendor/
What these CodeIgniter rules actually ignore
Every pattern below, and why it belongs in your .gitignore.
General
| Pattern | What it ignores |
|---|---|
*/config/development |
General |
*/logs/log-*.php |
General |
!*/logs/index.html |
General |
*/cache/* |
General |
!system/cache/* |
General |
!*/cache/index.html |
General |
!*/cache/.htaccess |
General |
user_guide_src/build/* |
General |
user_guide_src/cilexer/build/* |
General |
user_guide_src/cilexer/dist/* |
General |
user_guide_src/cilexer/pycilexer.egg-info/* |
General |
application/logs/* |
codeigniter 3 |
!application/logs/index.html |
General |
!application/logs/.htaccess |
General |
/vendor/ |
General |
How to use this .gitignore for CodeIgniter
- Copy the CodeIgniter rules above, or download the file directly.
- Create a file named .gitignore at the root of your Git repository and paste the rules into it.
- If some of those files are already tracked, run git rm -r --cached . then commit again — Git only applies ignore rules to untracked files.
- Commit the .gitignore so everyone on the team shares the same rules.