EOL lists of Ubuntu, Debian and CentOS for your server plannings
Chosing the right server operating system will probably save your life and avoid a lot of stress with your clients. Moving running projects (especially smaller ones that you’ve made for clients years ago) from an outdated and not-supported linux version can be a huge pain in the ass, and will quite often kill you (and your client). It’s also nearly impossible to upgrade a five year old operating system without harming the software, the running system and your client unless you are a system administrator or an advanced dev-op – but most of us developers aren’t. To prevent this (and to protect us from ourselves), it’s useful to have a look on the lifetimes of mainstream server operating systems.
Whenever possible – and if there’s no good reason not to do so – choose a future-proof Long Term Support (LTS) version. For deploy-and-forget-projects (very common if you work in/for agencies that make sites for clients that will be online for years without being touched ever again) it’s useful to go with CentOS, where very-long-term-support is some kind of standard. 2014’s CentOS 7 version will get security updates until 2024 according to the 10-year-maintenance-rule. In the PHP-context it’s good to know that the PHP version of long-term destributions usually sticks to a minor version for the entire OS life-time, so Ubuntu 12.04 LTS will only provide updates inside the PHP 5.3.x version, never going to 5.4 without further actions. Ubuntu 14.04 LTS will stay with PHP 5.5, providing only updates inside PHP 5.5.x for sure. Same with CentOS afaik (but correct me if I’m wrong).
Also keep in mind that security fixes are never installed automatically, you’ll have to do this manually from time to time or use an auto-installer (like the unattended-upgrades package).
CentOS will get 10 years of security support and 6 years of regular updates. [wikipedia]
The LTS version of Ubuntu 12.04 and Ubuntu 14.04 are the way to go. Ubuntu 14.04 LTS comes with PHP 5.5 by default and offers security updates until 2019, so it’s definitly a good choice. By the way there’s no reason to setup new projects on Ubuntu 12.04 LTS these days, as it’s outdated and comes with PHP 5.3, which has reached End of Lifetime this year. [wikipedia]
Debian 7 will probably deliver security updates until mid-2018. [wikipedia]