formated text

Newbie Tips : How to Use Bootstrap with CakePHP

Posted on

CakePHP is a popular framework that is widely used by web developers and has an active community, which is constantly developing. Until now, CakePHP has reached version 3.0 dev3. I prefer to use the stable version, which is version 2.4. In version 3.0, reportedly many added features and a completely new, so we as developers are very easy to create sophisticated web. Check our snippet code for cakephp

CakePHP is a machine, you must creating a style manually. For that, I usually combine CakePHP with Bootstrap. Bootstrap is a CSS framework issued by twitter. Well, this post will explain how to combining Cakephp with bootstrap.

This is actually very simple, just add a CSS and javascript files. But for beginners, may find it difficult.

Ok, the following steps.

  1. Download the latest cakephp, but select stable. (version 2.5.1)
  2. Download the latest bootstrap. click here

Ok, preparing is finished.

Copy Bootstrap CSS to CakePHP Folder

After that, open the bootstrap file that you downloaded. Search files in a CSS folder below.


then copy to folder Cakephp /app/webroot/css/


Copy Bootstrap JS to CakePHP folder

bootstrap js

then copy to cakePHP /app/webroot/js/


Lets create a simple web layout, then save to /app/View/Layouts/default.ctp

 <?php echo $this->Html->css('bootstrap.min.css');?>
  <?php echo $this->Html->javascript('jquery.js');?>
 <?php echo $this->Html->javascript('bootstrap.min.js');?>
 <?php echo $content_for_layout;?>

Now, you can get starting creating many project with CakePHP and bootstrap.


Incoming search terms:

  • bootstrap und cakephp
  • cake php bootstrap
  • cakephp app uses in bootstrap
  • cakephp css default php
  • how to access bootstrap in cakephp2
  • how to add bootstrap to cakephp
  • how to install bootstrap in cakephp
  • How to Use Bootstrap with CakePHP
  • php cake bootstrsp
Gravatar Image
Someone with passion in web design and web development. He love writing about web and internet. You can found him on Google+ and Facebook. Dont forget to follow him on Twitter.