Intstall Cakephp on webserver

I am a absolute beginner
I wonder if it is possible to put Cakephp directly on the web server and create a database there.

Or do I have to install composer etc. I have no experience with this

Is there a good manual, don’t get any further.

I download cakephp-4-4-10

If you have all the components (eg PHP, MYSQL) installed with the correct sub-components, you should be able to make it work by :

  1. unzip & copy the whole Cakephp folder into your webserver (e.g. public_html/cakephp_example). You can download it from Cakephp 4.4.10 release page
  2. point your webserver (e.g. Nginx, Apache) to the webroot folder (e.g. public_html/cakephp_example/webroot)
  3. goto your url and test it (a restart may be required if you did changes to your webserver)

Thanks for help , glad it works now

One error message:

  • There are configuration problems present which need to be fixed:
    Try adding your current top level domain to the DebugKit.safeTld config and reload.

Try to find the file where to configuration


Thank for help …

One error
There are configuration problems present which need to be fixed:
Try adding your current top level domain to the DebugKit.safeTld config and reload.

Where to find the file to config DebugKit


i read quickstart to start
i make al the files , database etc.

But got error messages like TemplatesController could not be found.
ControllerFactory.php etc.

  1. This depends on what kind of top level domain you are using but lets say you use you just add this at the end of your config/app_local.php
'DebugKit' => [
    'safeTld' => ['com'],
  1. Do you have a templates table in your database? Because a TemplatesController would be used to manage entries inside that table and would be located in src/Controller/TablesController.php

It would help if you tell us what kind of database structure/schema you are using and what kind of bin/cake bake all XYZ commands you have executed.

In general if you are new to CakePHP I would highly recommend you watch my CakePHP Tutorial series on youtube.

Generally, after installing cakephp, the easy way is to :

  1. setup your database (with tables, schema, etc).
  2. use the bin/cake bake command to auto-populate the files needed (Controller, Entity, Table, Templates)

Getting to your error. It means the file src/Controller/TemplatesController.php is present, but there is no method (also known as function & action) called articles. Try adding this function into the TemplatesController.php file

public function articles() {
  // your content here
  pr('I am articles method-action-function in TemplatesController');

You will also need to have a template file in templates/Templates/articles.php

Everything stated above can be easily done with the bin/cake bake mentioned by Kevin, but I am guessing you do not have command-line access to your server.

I made the database and files from:

Replace com with?

‘DebugKit’ => [
‘safeTld’ => [‘com’],

Tld is the abbreviaton for Top-level domain - Wikipedia

So for you would need

'DebugKit' => [
    'safeTld' => ['nl'],

Also you seem to misunderstand how CakePHP works.
You definitely do NOT want to call files “directly” from a URL like you tried with

Instead by default the controllers define what URLs are available.
Again, please watch the Youtube Tutorial Videos where I explain all of that.


Debugkit error solved

DebugKit can connect to the database.

The videos go too fast for me…
Is there a simple explanation available so that I can understand the basics and try out.

Have you watched the 4th video where I go through each generated file (especially the controller)?

This basically summerizes how CakePHP works.

Thanks but maybe its to difficult for me

I search for a small tutorial with code so i can try

which url should i use?

finally i see the table.

Cant add a row now , and when i wil edit second row (test3) error.

Did i forget some code?

Telling us what the error is would go a long way to helping solve it.

Try out if you wil, edit has to make with the slug i think

Can i find somewhwere the whole code from this tutorial?

Ad > error
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘’ for key ‘slug’

edit (new row) > error
he passed parameter or parameter type is invalid in Articles::edit()

Well, it seems pretty clear that the new row you’re trying to insert has the same slug value as a row already in the database? You should have a unique validation for that if you’re going to have a database constraint about it.

Dont now how to fix.

I think the file
src/Model/Table/ArticlesTable.php is not complet or wrong.

Are you allowed to have the same slug on more than one record? Are you trying to add a new record that has the same slug as an existing one?

I try out to fond out the meaning off a slug…something with url?

I only can ad a title and a body