How To Check CakePHP Version in a CakePHP Project

Reading Time: 3 minutes
5,391 Views

In this article we will see the classified information about How to check CakePHP project in a CakePHP project. This is a very simple process. We need this case when we install, migrate or someone work with existing CakePHP project.

There are 3 ways to check CakePHP project version –

  • Using Bake Console Command
  • Looking into VERSION.txt File
  • Using Core Configure Class

Learn More –

Let’s get started.


CakePHP 4 Installation

To create a CakePHP project, run this command into your shell or terminal. Make sure composer should be installed in your system.

$ composer create-project --prefer-dist cakephp/app:~4.0 mycakephp

Above command will creates a project with the name called mycakephp.


Method #1 – Using Bake Console Command

Open CakePHP project into terminal and run this command into it.

$ bin/cake version

This command will output the current version of your project in which you are working with.

For Example, in my case it is 4.3.5


Method #2 – Looking into VERSION.txt File

You can find this given file VERSION.txt into /vendor/cakephp/cakephp folder.

If you open up this file then you should see the CakePHP version into it.

For Example, in my case it is –


Method #3 – Using Core Configure Class

You can use this code snippet to get the current version of CakePHP in which you are working with.

echo Configure::version();

You can find this Core class Configure.php inside /vendor/cakephp/cakephp/src/Core folder.

We hope this article helped you to learn about How To Check CakePHP Version in a CakePHP Project Tutorial in a very detailed way.

If you liked this article, then please subscribe to our YouTube Channel for PHP & it’s framework, WordPress, Node Js video tutorials. You can also find us on Twitter and Facebook.