CakePHP Installation

How to Setup CakePHP Using Xampp On Windows

CakePHP has some system requirements:

1. In our system, there should be a local server like WAMP or XAMPP Server. For example, Apache and we can also use Nginx or Microsoft IIS.

2. For running the CakePHP web application, we should require the minimum version of PHP 4.3.2 or higher (including PHP 7.3).

3. mbstring PHP extension

4. intl PHP extension

5. simplexml PHP extension

6. PDO PHP extension

7. You require at least these database engines (phpMyAdmin, MySQL 4+, PostgreSQL, and a wrapper for ADODB).

8. You have to sure that the directories logs, tmp, and all its subdirectories give write permission for various operations in CakePHP.

Installation of CakePHP

Before installing the CakePHP, you have to check whether your system contains the current php version or not, you can check it by writing in command prompt.

php  -v

Installation of Composer

  • The installation procedure of CakePHP is easy. CakePHP uses a Composer for dependency management tool in php. So, we have to install the composer before installing Cakephp. We can install composer by visiting this website: https://getcomposer.org
  • It will show this page where we can click on the download button, and then it will open a new window for choosing the OS version to download either Linux, MacOS, and window. Now click on Download the Composer-Setup.exe file. It will download the current version of the composer in your system. You can see in below screenshot.
Download the Composer-Setup
  • Now double click on the composer setup file, then it will show you this pop-up screen.
double click on the composer setup file
  • After that, you have to click on the Run button.
you have to click on the Run button
  • Then click on Next button to continue the further steps
click on Next button to continue
  • In the above screen, you can see the path of the composer then click on the Next button.
see the path of the composer then click on the Next
  • After this, click on the install button.
click on the install button
  • Then again, click on the Next button.
again, click on the Next button
  • After that, click on the Finish button to come out from the installation procedure.
 installation procedure
  1. If you want to check-in, your system has an installation of the composer setup successfully. Then you can check by command prompt: by just writing as a composer. That time your computer must be connected with the internet because the composer will download some packages and framework for CakePHP, and it may take a few minutes, then it will show the below picture. 
  2. After downloading some packages and framework then it will show this screen for successful completion of the composer in your system
completion of the composer in your system

Now we have to create the CakePHP folder in our local server either in htdocs of xampp folder or in the www folder of wamp. So, we have to provide a proper path in command prompt to that directory where we want to install the CakePHP like this C:\wamp64\www and then press enter button.

create the CakePHP folder

After that you have to write this statement like this:

composer create-project --prefer-dist cakephp/app my_app_name

CakePHP3.8” is the folder name of your project, and if you want to change the name of your project, then you can change by editing in the command prompt before running the project and then press the enter key from your keyboard. It will start the downloading of CakePHP supportive files in your folder name, which you have provided at that time. The supportive data of CakePHP maybe took some more time to download online.

start the downloading of CakePHP

After this, it will take permission to set the folder name by yes/no option. And if you write y, then it set that folder name which you have provided, or if you don’t want to set another folder name, then you can change by “n,” and again, it will ask for set the folder name of your CakePHP.

After that, you will see your CakePHP application have successfully installed in your system.

You can check it directly by visiting this URL –http://localhost/CakePHP3.8/ in the browser. This URL will direct link you to the given below screen. This image shows that your CakePHP software has successfully installed.

CakePHP software has successfully installed