CakePHP: baking cake in Windows

There are a lot of articles on the internet on how to make CakePHP and it’s bake function to work in Windows.

I have tried setting the PATH environment variable to match the console

PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\xampp\php;c:\xampp\cake\cake\console\

No avail. So I am just doing this instead after creating the databases.

  1. Click Start > Run.
  2. Type cmd then press Enter.
  3. Change directory to where my extracted CakePHP files were
    cd \xampp\htdocs\cake (press enter)
  4. Type: cake\console\cake bake all
  5. That’s it. All is well.

If you guys know how to make Windows recognize the cake.bat file to execute when it’s folder is included in the path, feel free to comment.

NOTE: I am not using the production setup of CakePHP and the command may vary depending on that. Please feel free to correct.