How do I upgrade PHP for Debian 7?
Hi,
We want to upgrade our PHP from PHP 5.4.45 version to PHP 5.6.33 version. Our plan contains backups, so we need to know how much time it would take to restore the backup if something goes wrong.
1 Reply
Hi there,
For Debian 7, the update and upgrade process would generally just require that you have the correct repos for the PHP version you're trying to install. You should be able to add these if you haven't yet and then complete the upgrade process by performing the following commands:
echo "deb http://packages.dotdeb.org wheezy-php56 all" >> /etc/apt/sources.list.d/dotdeb.list
echo "deb-src http://packages.dotdeb.org wheezy-php56 all" >> /etc/apt/sources.list.d/dotdeb.list
wget http://www.dotdeb.org/dotdeb.gpg -O- | apt-key add -
apt-get update
apt-get install php5-cli php5-fpm ….. (or whatever package you might need)
That being said, if you already have the correct repos set up, it'd just be a matter of performing the following:
apt-get update
apt-get install php5-cli php5-fpm
Restoring from a backup can take several minutes depending on the size of your Linode, however for smaller Linodes this shouldn't take too long at all. For more information regarding Linode's backups service, you should be able to find some documentation by clicking here.
I hope that helps!