Professional Documents
Culture Documents
CI4 Install
CI4 Install
App Starter
Installation & Set Up
Upgrading
Pros
Cons
Structure
Latest Dev
Adding CodeIgniter4 to an Existing Project
Set Up
Upgrading
Pros
Cons
Structure
Translations Installation
Composer can be used in several ways to install CodeIgniter4 on your system.
The first two techniques describe creating a skeleton project using CodeIgniter4,
that you would then use as the base for a new webapp. The third technique described
below lets you add CodeIgniter4 to an existing webapp,
Note
If you are using a Git repository to store your code, or for collaboration with
others, then the vendor folder would normally be �git ignored�. In such a case, you
will need to do a composer update when you clone the repository to a new system.
App Starter
The CodeIgniter 4 app starter repository holds a skeleton application, with a
composer dependency on the latest released version of the framework.
This installation technique would suit a developer who wishes to start a new
CodeIgniter4 based project.
If you omit the �project-root� argument, the command will create an �appstarter�
folder, which can be renamed as appropriate.
If you don�t need or want phpunit installed, and all of its composer dependencies,
then add the --no-dev option to the end of the above command line. That will result
in only the framework, and the three trusted dependencies that we bundle, being
composer-installed.
Upgrading
Whenever there is a new release, then from the command line in your project root:
Read the upgrade instructions, and check Breaking Changes and Enhancements.
Pros
Simple installation; easy to update
Cons
You still need to check for app/Config changes after updating
Structure
Folders in your project after set up:
The development user guide is accessible online. Note that this differs from the
released user guide, and will pertain to the develop branch explicitly.
Develop your app inside the app folder, and the public folder will be your document
root.
You will have to adjust the system path to refer to the vendor one, e.g.,
ROOTPATH . '/vendor/codeigniter4/framework/system', - the $systemDirectory variable
in app/Config/Paths.php
Upgrading
Whenever there is a new release, then from the command line in your project root:
Pros
Relatively simple installation; easy to update
Cons
You still need to check for app/Config changes after updating
Structure
Folders in your project after set up: