How To Upgrade CakePHP Print

  • cakephp
  • 84

Upgrading or migrating CakePHP can be quite a daunting task to the uninitiated, but in most cases the process is as simple as any other PHP application. How complicated the upgrade/migration is going to be is dependant on whether you are moving up the major or minor version path.

Moving from a minor version is considered an 'upgrade', whereas moving from one major version to the other is considered a 'migration'

As always, before performing any upgrade we highly recommend that you perform a full backup of the files and databases that may be affected by the upgrade process.

If you are upgrading a minor version (e.g. v1.2.5 to v1.2.6) the process is simple, however, if you are making a major version upgrade the process can become quite complicated and warrants some detailed testing prior to upgrade.

Minor version upgrades can be done by simply copying the new /cake directory over the old one, or even better, rename the old /cake directory, install the new /cake directory and test the installation, that way you can quickly switch back to the old version if something goes wrong or isn't working the way you want. The key thing here is not to copy over the /app directory, as this will wipe out all your application specific configuration settings.

Major version updates (e.g 1.2.x to 1.3.x) should be performed by following CakePHP migration instructions and we recommend testing the upgrade in a pre-production environment, if possible.


Was this answer helpful?

« Back