In this tutorial we will guide you how to Install CakePHP 3 Using Composer step by step. CakePHP uses Composer, a dependency management tool, as the officially supported method for installation. Though Composer it’s simple and easy to install CakePHP.
Install CakePHP 3 Using Composer
Before Install CakePHP 3 make sure following requirements are enabled and installed on your machine:
1) You must have PHP 5.5.9 or greater.
2) mbstring extension and intl extension must be enabled. Make sure these lines are enable by removing the semicolon (;) from the start in php.ini file.
#2. Install Composer
The next thing you need to do Install Composer On Windows With XAMPP. This process will take another 5-10 minutes. Below is the step by step tutorial:
Once you successfully installed the Composer, then type composer and press enter in the terminal you will get following response like in the below image.
Go to htdocs directory on your XAMPP server to Install CakePHP 3
Now Run the following command to install CakePhp 3 using Composer on your server in cakeapp folder in this C:\xampp\htdocs\cakeapp\ path.
composer create-project --prefer-dist cakephp/app cakeapp
Once CakePhp 3 installation start then you will get following response like in the below image.
Once you successfully installed CakePhp 3 on your machine then you will get following response like in the below image.
Finally it will ask you to set Folder Permission, so press Y to continue.
#3. Configuration Database
Configuration database details in config/app.php file.
'Datasources' => [ 'default' => [ 'className' => 'Cake\Database\Connection', 'driver' => 'Cake\Database\Driver\Mysql', 'persistent' => false, 'host' => 'localhost', 'username' => 'root', 'password' => '', 'database' => 'cakeapp', 'encoding' => 'utf8', 'timezone' => 'UTC', 'flags' => , 'cacheMetadata' => true, 'log' => false, 'quoteIdentifiers' => false, 'url' => env('DATABASE_URL', null), ], ]