Download LAMP (Apache, PHP 7.0 and MySQL/MariaDB and phpMyAdmin) Server IMG File that I have prepared for Raspberry pi and it will fit on 8GB SD card, this image comes with the LAMP stack and including Apache, PHP 7.0 and MySQL/MariaDB and phpMyAdmin pre installed and configured, you can download this image and burn it on SD card (minimum 8GB sd card required). if you need help with how to copy img file to sd card please check this OS (Raspbian Jessie) Installation and WiFi Configuration.
You need to expand the file system to the full size of the sd card. I did an update and upgrade to keep it all current to date 07-03-2018. The Image is 1,760.78 MB in size.
Note: This img files isn’t compatible with PiHome Smart Heating System. You need to build LAMP with php 5 and mysql