How to install PHP 5.6 or newer on Raspbian

Since no repo has an ARM version of PHP >5.4, compiling and installing by hand it's all we have.
Published on April 18, 2016 in How-tos
Read time: 1 min

Raspberry Pi is an awesome piece of hardware so you might need PHP on it for whatever kind of project.

Unfortunately the latest PHP version in official repo is (the no longer maintained) 5.4 and third-party repo do not support the ARM architecture. We have only one option left: download source, compile and install.

I’ve made a script for that and made it available as a gist.

How to use the script

cd $HOME
wget -O
chmod +x

Hope it helps!

Thanks for reading.


Got some words you want to share? Tell me!