Home / Linux  / How to upgrade php and mysql on plesk panel 11 or 12

How to upgrade php and mysql on plesk panel 11 or 12

Do us a favor with share this post 🙂

As  plesk panel provide lower version of php and mysql , so for the application which needs higher php version we need to upgrade php version to higher than php 5.3 , In plesk it is very easy to upgrade php as well as mysql , you just need to follow steps as we are showing here,

First we are checking php and mysql version before upgrade

[[email protected] ~]# php -v  PHP 5.3.3 (cli) (built: Jul 9 2015 17:39:00)  Copyright (c) 1997-2010 The PHP Group  Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies  with the ionCube PHP Loader v4.6.0, Copyright (c) 2002-2014, by ionCube Ltd.    [[email protected]~]# mysql -V  mysql Ver 14.14 Distrib 5.1.73, for redhat-linux-gnu (x86_64) using readline 5.1  

Download and Install epel and remi repository

[[email protected] ~]# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm  [[email protected] ~]# rpm -Uvh  epel-release-6-8.noarch.rpm  [[email protected] ~]# wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm  [[email protected] ~]# rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm  

Now edit remi.repo and enable remi repository

[[email protected] ~]# vi /etc/yum.repos.d/remi.repo    [remi]  name=Remi's RPM repository for Enterprise Linux 6 - $basearch  #baseurl=http://rpms.remirepo.net/enterprise/6/remi/$basearch/  mirrorlist=http://rpms.remirepo.net/enterprise/6/remi/mirror  enabled=1  gpgcheck=1  gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi  

save and exit
Now install php by yum command

[[email protected] ~]# yum install php    =========================================================================================  Package                 Arch           Version                     Repository     Size  =========================================================================================  Updating:  php                     x86_64         5.4.45-1.el6.remi           remi         2.8 M  Installing for dependencies:  compat-mysql51         x86_64         5.1.54-1.el6.remi           remi         1.4 M  libaio                 x86_64         0.3.107-10.el6             base           21 k  t1lib                   x86_64         5.1.2-6.el6_2.1             base         160 k  Updating for dependencies:  mysql                   x86_64         5.5.45-1.el6.remi           remi        5.8 M  mysql-libs             x86_64         5.5.45-1.el6.remi           remi         778 k  mysql-server           x86_64         5.5.45-1.el6.remi           remi           10 M  php-cli                 x86_64         5.4.45-1.el6.remi         remi         4.1 M  php-common             x86_64         5.4.45-1.el6.remi           remi         961 k  php-gd                 x86_64         5.4.45-1.el6.remi           remi         147 k  php-imap               x86_64         5.4.45-1.el6.remi           remi           83 k  php-mbstring           x86_64         5.4.45-1.el6.remi           remi         948 k  php-mysql               x86_64         5.4.45-1.el6.remi           remi          140 k  php-pdo                 x86_64         5.4.45-1.el6.remi           remi         124 k  php-xml                 x86_64         5.4.45-1.el6.remi           remi         175 k    Transaction Summary  =========================================================================================  

After installing the packages check the php and mysql upgraded version

[[email protected] ~]# php -v  PHP 5.4.45 (cli) (built: Sep 2 2015 18:54:00)  Copyright (c) 1997-2014 The PHP Group  Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies  with the ionCube PHP Loader v4.6.0, Copyright (c) 2002-2014, by ionCube Ltd.    [[email protected]~]# mysql -V  mysql Ver 14.14 Distrib 5.5.45, for Linux (x86_64) using readline 5.1  

Now fix the privilege for mysql databases as this is a important step

[[email protected]~]# mysql_upgrade -uadmin -p`cat /etc/psa/.psa.shadow`  

Now php and mysql successfully upgraded .
Hope you enjoyed the article , for any concern please comment here

Do us a favor with share this post 🙂
Review overview


Time limit is exhausted. Please reload CAPTCHA.