A skeleton for creating applications with CakePHP 5.x.
The framework source code can be found here: cakephp/cakephp.
- Download Composer or update
composer self-update
. - Run
php composer.phar create-project --prefer-dist cakephp/app [app_name]
.
If Composer is installed globally, run
composer create-project --prefer-dist cakephp/app
In case you want to use a custom app dir name (e.g. /myapp/
):
composer create-project --prefer-dist cakephp/app myapp
Next, install tailwind and vite with npm:
npm install
You will need to build assets as well:
npm run build
You can now either use your machine's webserver to view the default home page, or start up the built-in webserver with:
bin/cake server -p 8765
In a separate terminal you can run vite dev
to have CSS rebuilt on-demand.
npm run dev
Alternatively, you can run both cake server
and npm run dev
with:
bin/cake devserver
The devserver
command is experimental.
Then visit http://localhost:8765
to see the welcome page.
Since this skeleton is a starting point for your application and various files would have been modified as per your needs, there isn't a way to provide automated upgrades, so you have to do any updates manually.
Read and edit the environment specific config/app_local.php
and set up the
'Datasources'
and any other configuration relevant for your application.
Other environment agnostic settings can be changed in config/app.php
.
The app skeleton uses the tailwind CSS framework by default.