You are here
Home > CakePHP > How To Install CakePHP 3 Using Composer (step by step)

How To Install CakePHP 3 Using Composer (step by step)

How to install CakePHP 3 using composer

Installation of CakePHP 3 is tricky or difficult for the beginner. I will be able to provide you with step by step directions to install  CakePHP 3 on your computer, All you wish to try and do is simply follow this tutorial


Requirements :

  1. Must you have installed PHP 5.6 or above on your computer
  2. Must be enabled mbstring extension and intl extension to install CakePHP 3 on your computer.
  3. PHP Lamp(Xampp or Wamp) Server Must be install on your computer or server.


For XAMPP Server intl extension is already installed, you need to enable this extension to uncomment below the line in your php.ini file. Php.ini file is located at c:\xampp\php\php.ini or where you have installed XAMPP.

Before uncomment:

After uncommenting:

After uncommenting above line you must restart your XAMPP server using XAMPP control panel.

For WAMP Server, the intl extension is enabled by default. But to make it work you have to go to php folder (by default) C:\wamp\bin\php\php{version}, copy all the files that look like icu*.dll and paste them into the Apache bin directory C:\wamp\bin\apache\apache{version}\bin. Once you completed please restart WAMP server.


Installing CakePHP 3 Framework:

CakePHP 3 uses  the composer to install, its dependency elements, and will some automatic configuration work for you. So to install CakePHP 3 you want to have composer installed on your computer.

How to install composer:

Composer Installation for windows users is extremely simple. All you would like to try and do is simply download .exe installer file from the official website or click here to direct download.

You can also install the Composer using curl using below command.

After successfully installed the composer, then type composer and press enter in the terminal you will be showing the response like in the below image.


How to install CakePHP 3:

Before install to CakePHP 3 using Composer, You should be in htdocs folder to start CakePHP 3 download. In htdocs folder Shift+Right click and choose “Open command window here” option. Like below image.


You can use other option for go to folder with cd command:

Now you can run the following command using your terminal window.

It will take some time if you installing CakePHP first time using Composer. The second time it takes from the cache.

Last, of the installation process it will ask you to set permission for temp directory and to generate security salt. So please give Y to set the permission and generate security salt.

Finally successfully installed CakePHP 3 on your computer. So go to the project URL (http://localhost/codex/) on your browser to see CakePHP default home page.

How to change database  setting :

1. Open app.php file from config folder.

2. Find Datasources array in the file.

3. Change database name, username, password.


Leave a Reply

1 × 4 =