Chat with us, powered by LiveChat

This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

How to Install CakePHP on Cloudways using SSH Client

January 14, 2016

4 Min Read
Reading Time: 4 minutes

CakePHP is a free open source framework which is used to develop rapid application using PHP. It is a MVC framework and it has an active friendly community from where you can take guidance too.

how to install cakephp

A lot of our users at Cloudways have been sending in requests to add CakePHP as a one-click application install. We are looking into that feasibility however, at the moment you can easily install any version of CakePHP on Cloudways using the SSH terminal. For this, you need to sign up on Cloudways Managed PHP Hosting and follow the instructions given below to install CakePHP on Cloudways.

After you have created an account with Cloudways, Select PHP Stack from the drop down and then fill up your Application name, Server Name and Select Default Project from drop down.

selecting php stack


Then choose your desired cloud provider from Vultr, DigitalOcean, Amazon or Google and desired server size and location. Now click on Launch and wait for the server to start.

Selecting server and location

After the server is launched, rename your application to cakephp so it becomes easy for you to access it via SSH client. For this navigate to select Applications from the top menu, then select your application.

selecting application

Now select Application Setting from the left side menu in your application and click on pencil below the Folder to rename it.

change application name

Launch your SSH Terminal

Now navigate to Servers from the top menu, click on your server and then from the left side menu select Master Credentials launch the SSH terminal.

select your server

Launch SSH terminal

Once SSH is launched, log in to it with your username and password provided in Master Credentials and type the following commands to reach your public_html

cd application
cd cakephp
cd public_html

How to Install CakePHP using Git

Now go to the git repository of CakePHP, copy the HTTPS and type the following command to install it.

git clone -b 2.7 git://

To check whether cakephp is installed or not, copy the application url from Application Tab, paste it in to your browser and type /cakephp at the end of it. Your page should look like this:

CakePHP 2.7.8 release

Now, there are 2 errors which you see. One is that your database file is not configured and the second is, that the debug kit is not installed.

Enable Database Config file

First we need to rename the database file. For that, you need to perform the following commands on your SSH.

cd cakephp
cd app
cd Config
mv database.php.default database.php

Since we have renamed the database file, you need to reload the cakephp page and the error will be removed now.

CakePHP after db

Install Debug Kit

CakePHP recommends you to use its own debug kit to enhance CakePHP debugging and error reporting. Let’s get started. First you need to reach the main cakephp folder and then need to update it. Perform the following commands to reach the cakephp folder and install debug kit.

cd ..
cd ..
composer update

Once the update is complete, the debug kit will be installed in Plugin/DebugKit. We need to copy it inside the plugin folder in your app to use it. To do this type the following command.

cp -r Plugin/DebugKit app/Plugin

Now we need to configure your CakePHP to use it. For that connect it to your ftp server using filezilla or other software. Enter your ftp info, which can be found in Server Management tab under Master Credentials. First, you need to go to your cakephp folder inside public_html and then need to do the following steps to enable it.

  1. Go to app/config/ open bootstrap.php in an editor and type the following line of code in it:
  2. Now open core.php in an editor and set debug to 1
    Configure::write('debug', 1);
  3. Now we need to include its toolbar in AppController for that go to app/Controller/ and open AppController.php and add the following line inside its controller
    class AppController extends Controller {
    public $components = array('DebugKit.Toolbar'); //Add this line
  4. Now we need to remove sql dump to use the log of Debug kit only. For that goto app/View/Layouts/ and open default.ctp and comment the following line in it.
    <?php //echo $this->element('sql_dump'); ?>

Now goto your cakephp link in the browser and you will find Debug kit enabled.

CakePHP 2.7.8 release

Now CakePHP is fully configured! What you can do more? You can configure your database with this and connect your domain with Cloudways and start using it. Cloudways is not only an affordable managed cloud hosting provider, but it is also the most robust platform that is built to withstand the maximum surge in traffic and greatly streamlines how you could install CakePHP. Sign up now and experience the difference in pageload times yourselves.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Launch PHP websites without the worry of Server Management.

Pre-Installed Optimized Stack with Git, Composer & SSH

Ahmed Khan

Ahmed was a PHP community expert at Cloudways - A Managed PHP Hosting Cloud Platform. He is a software engineer with extensive knowledge in PHP and SEO. He loves watching Game of Thrones is his free time. Follow Ahmed on Twitter to stay updated with his works. You can email him at

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

BFCM 2019