In this tutorial, we will show you how to install CakePHP on Debian 11. For those of you who didn’t know, CakePHP is a web application development framework written in PHP, built on the concepts of Ruby on Rails. As we know Ruby on Rails uses Ruby as a language but with development features that Cake wanted to implement in PHP. It’s a foundational structure for programmers to create web applications. Models, Views, and Controllers are used for the separation of business logic from data and presentation layers.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you through the step-by-step installation of the CakePHP on a Debian 11 (Bullseye).
- A server running one of the following operating systems: Debian 11 (Bullseye).
- It’s recommended that you use a fresh OS install to prevent any potential issues.
non-root sudo useror access to the
root user. We recommend acting as a
non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.
Install CakePHP on Debian 11 Bullseye
Step 1. Before we install any software, it’s important to make sure your system is up to date by running the following
apt commands in the terminal:
sudo apt update sudo apt upgrade
Step 2. Installing the LAMP stack.
A Debian 11 LAMP server is required. If you do not have LAMP installed, Please read our previous tutorial to install LAMP Server on Debian 11.
Step 3. Installing Composer.
Now we install Composer using the following command on your Debian system:
curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer chmod +x /usr/local/bin/composer
Step 4. Installing CakePHP on Debian 11.
After installing the composer on your system. Let’s create a CakePHP application named “idroot-app” using the composer command as below:
composer create-project --prefer-dist cakephp/app [project-name]
composer create-project --prefer-dist cakephp/app [idroot-app]
Next, access it and make executable the bin/cake file that will help us to run the project in developer mode. To do this you have to run:
Also, you can specify a host and a port to listen on:
bin/cake server -H [host] -p [port]
bin/cake server -H [192.168.77.21] -p 
Step 5. Accessing CakePHP on Debian.
Once successfully installed, open a web browser and go to
https://192.168.77.21:8080 and you will see the following screen starting the installer:
Congratulations! You have successfully installed CakePHP. Thanks for using this tutorial for installing the latest version of the CakePHP on Debian 11 Bullseye. For additional help or useful information, we recommend you check the official CakePHP website.