php upgrade

The php version 5.4 is coming to an end September 2015. Websites still on php 5.4 after September 2015 would be deemed vulnerable and it would be advisable for the website backend php to be updated to 5.5 as a minimum to get official support from php; unless your hosting provider will provide support for older versions of php.


As always a backup is highly recommends before updating the php version as it could render your website un-viewable due to php errors.

Here we currently have the older version of php 5.4

To perform the update, we will add new sources to our server at:

nano /etc/apt/sources.list

deb wheezy-php55 all
deb-src wheezy-php55 all

This will enable us to update the php from 5.4 to 5.5. As the sources are coming from we would also need to install the key for the installation to be successful. We can do this the the following command:


--2015-07-15 00:35:00--
Resolving (
Connecting to (||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5299 (5.2K) [application/octet-stream]
Saving to: `dotdeb.gpg'

100%[======================================>] 5,299       --.-K/s   in 0s      

2015-07-15 00:35:00 (184 MB/s) - `dotdeb.gpg' saved [5299/5299]

Now that the key has been downloaded, we will look to install the key.

apt-key add dotdeb.gpg


To invoke the updates, we will use 2 commands:

apt-get update

apt-get install php5

Finally to apply the updates to our web server we will use:

service apache2 restart