PHP Security in Short
PHP flaws sit under every site on the server: WordPress, Drupal, Laravel, Magento and everything else. Each PHP release line gets two years of bug fixes and then two years of security-only fixes, after which it gets nothing. Many servers still run lines that stopped getting fixes years ago.
How to Keep PHP Patched
- Know which release line you're on (
php -v) and when it stops getting security fixes. The version check above tells you. - On Ubuntu and Debian, PHP comes from the distribution or from Ondřej Surý's packages. Either way,
apt upgradebrings in fixes. Restart PHP-FPM afterwards so the running copy is the new one. - On shared hosting, choose a supported PHP version in your control panel.
- Plan upgrades to a new release line well before the old one's end-of-life date. Apps usually need testing first.