cat /etc/centos-release # nice to know what CentOS we're running
yum update # update yum (don't upgrade as it will remove essential stuff for our specific server)
yum remove php-common # remove php-common
yum clean all # clean up yum
yum install wget # if wget isn't on the system, install it
# setup a temporary downloads folder
mkdir /temp
cd /temp
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7*.rpm epel-release-7*.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7*.rpm
# enable both [remi] and [remi-php56] sections (essentially make them have enabled=1)
nano /etc/yum.repos.d/remi.repo
# now install new php version
yum install --skip-broken -y gcc php56w php56w-bcmath php56w-cli php56w-common php56w-devel php56w-fpm php56w-gd php56w-ldap php56w-mbstring php56w-mcrypt php56w-mysql php56w-odbc php56w-pdo php56w-bz2 php56w-xml php56w-posix php56w-pcre php56w-zlib php56w-ftp php56w-tokenizer php56w-pear php56w-pecl-apcu php56w-pecl-apcu-devel php56w-pecl-geoip php56w-pecl-igbinary php-pear php-pecl-zendopcache ImageMagick ImageMagick-devel
pecl install imagick
# on our install, we have separate php initializations
# create the file and edd the following
cat > /etc/php.d/20-imagick.ini
; Enable imagemagick extension module
extension=imagick.so
# restart and test
apachectl restart
# remove temporary downloaded rpm repo files as they are cached here now: /var/cache/yum/x86_64/7/
rm -rfv /temp