CakePHP is a PHP framework for rapid development of web application. Recently CakePHP has released its latest version 3.8 with a variety of changes to improve speed and security. This article will help you to Setup CakePHP 3.8 (or latest version) on Ubuntu 18.04 & 16.04 LTS systems.
![]()
Requirements:-
How to Install CakePHP? Are you in love with the development of websites with PHP (an acronym for hypertext preprocessor), then a web development framework is waiting to make your life easy and now you can lay emphasis at your business logic rather than messing around with setting up all architectural logistics from scratch? CakePHP is that sound framework, likely to offer you more than. May be useful for you to develop CakePHP under Windows, you can also use IIS7 with URL ReWrite Module. Download via Windows Web.
Step 1 â Install LAMP Server![]()
You can skip this step for the system having LAMP setup already. If you donât have LAMP installed on your system proceed with the following commands to Setup LAMP on your Linux Server.
Step 2 â Install Composer
Now CakePHP is using a composer for managing dependencies. So first we need to install Composer using the following command on the system. If already installed then just update to the latest version.
Install Composer:
Update Composer:
Step 3 â Create CakePHP 3 Application
After installing the composer on your system. Letâs create CakePHP application named âMyAppâ using composer command as below.
Now set the proper permission for your project files. For Debian based system Apache default uses www-data as the user. So change files ownership as per your setup.
Step 4 â Setup Database for CakePHP
For this article, we are using MySQL as the database server. First, use the following commands to create a MySQL database and create.
Now edit config/app.php configuration file and search for your database setting. Make necessary changes as per below details
Here, you have two options to run your CakePHP application. For development, the system follows Step 5(A) and for Production deployment follow step 5(B).
Step 5(A) â Deploy CakePHP on Development System![]()
First is to use its built-in web server preferred for development purpose installation. This will make your application available at http://host:port. From the app directory, execute:
By default, without any arguments provided, this will serve your application at http://localhost:8765/.
You can also specify your own host and port like below
This will serve your application at http://192.168.10.123:1234/
Step 5(B) â Deploy CakePHP on Production System
Second is deploy with external web servers like Apache itâs preferred for production use. Letâs create an Apache VirtualHost configuration file using the following content.
![]() Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |