Best Practices for upgrading old Cake install to something newer


I have a small CakePHP 2.5.2 website running on Apache-backed PHP 5.3.10 on an Ubuntu 12.04 LTS VPS. Everything is actually working quite well and has been stable for the last few years.

However, I’m starting to worry that with Ubuntu 12.04 reaching the end of its support life that I should be thinking about upgrading things. Unfortunately, I have little time to commit to a big upgrade push, so I’m looking for suggestions and advice on what to do.

Would it be worth just starting a new Ubuntu 16.04 LTS VPS and migrating my site code over onto a newer version of Cake and PHP? My gut thinks this could turn into a huge hassle of cascading problems. I could try to upgrade in place with good backups in the event something doesn’t work, but I can see this being equally problematic.

What’s the best upgrade strategy for someone who wants to keep stuff safe but has little time to dedicate to the upgrade process?


Try to simulate the 12.04 VPS in a local pc (docker, virtualbox, ext)
Install PHP 5.6 (you could try 7.0/7.1 but almos like some changes must be done to the codebase)
And try it!


Thanks @raul338 I think you meant try the 16.04 VPS in something like docker/virtualbox, right?
I actually have no problem paying Linode for a cheap VPS for a few days since that’s where things would end up anyway (and they have a new plan that’s only $5/month with hourly billing so only a few $) It’s just my time that’s limited so I’m looking for advice as to the best approach to start with.


Yes, at least thats the bare minimun. You can still use at least a ppa for php5.4 to try to not break anything.

IMHO I would go with 5.6, almos like nothing could break


Thanks again for your suggestions @raul338. I followed your advice and built a new VPS with 16.04 and used a PPA for PHP 5.6 and everything seems to be working well. Had to tweak only a tiny number of things to get it going, mostly it was just re-learning the best practices for setting all this stuff up.