Friday, November 21, 2014

How to upgrade PHP version without any downtime?

Is it possible to upgrade the version of PHP running on my server without any significant downtime?



What I want to avoid is my sites being down for minutes (or longer if something goes wrong) while I upgrade PHP. I don't mind if they're down for a few seconds.



Ideally I would like to have two versions of PHP installed on a server and just flick a switch to flip between them. That way if there are unforeseen problems with the new version I can flick the switch back again to go back to the old version.



The only way I can think of is to have two servers running different version of PHP and use DNS to choose which one users see. Is it possible with a single server?




Edit



I should have mentioned that I'm using an Ubuntu 10.04 server running Nginx and PHP-FPM/FastCGI.

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...