Home Servers Update phpMyAdmin on CPanel/WHM to Latest Version

Update phpMyAdmin on CPanel/WHM to Latest Version

2
0
88
 Updated on 31OCT2015 with links 

Well, why to write a how-to for simplest thing like how to Update phpMyAdmin on CPanel

That’s what I thought. The simplest way to upgrade phpMyAdmin to latest version is from WHM. Let’s call it Method 1.

Method 1

  1. Login to WHM as root.
  2. When at Home, go to CPanel.
  3. Click on Upgrade to Latest Version.

However, this only upgrades everything to the release which is approved as Stable and Tested by Cpanel team. So, all other module may get updated to latest release but this is not always true with phpMyAdmin.

Method 2

Assuming you have root credentials, login to shell (SSH) as root user.

Issue following command to change directory to Cpanel,

 cd /usr/local/cpanel/base/3rdparty

Rename old phpMyAdmin folder by command

mv phpMyAdmin backup_phpmyadmin

Pull new phpMyAdmin zip package using

wget https://linktonewpackage

Get link to new package from here https://www.phpmyadmin.net/downloads/ . I used version 4.4.15; so,

wget https://files.phpmyadmin.net/phpMyAdmin/4.4.15/phpMyAdmin-4.4.15-english.zip

Extract the zip using,

unzip phpMyAdmin-4.4.15-english.zip

Now rename the extracted folder

mv phpMyAdmin-4.4.15-english phpMyAdmin

(here phpMyAdmin should be exact as linux is case sensitive)

Now you need to copy the old config file in new folder,

cd backup_phpmyadmin

and then

cp config.inc.php /usr/local/cpanel/base/3rdparty/phpMyAdmin

You are done. Try the link from your WHM or Cpanel area.

If you get error,

Invalid authentication method set in configuration: cpanel

then you will need to change the authentication method in config file. I still couldn’t find out the exact cause as it is same config file but I guess, it must be somewhere in the old directory.

To solve this, come out of current folder and enter newly renamed one,

cd ..

and then

cd phpMyAdmin

Edit config file

nano config.inc.php

Find this line,

 $cfg['Servers'][$i]['auth_type'] = 'cpanel'

Replace ‘cpanel’ with ‘http’. Save the file and come out. You can also try ‘cookie’ instead of ‘http’ first. Try the link from WHM or Cpanel.

This method will update complete phpMyAdmin so, it will work for all domains on given server. No need to do things separately. There can be two only two downsides. First is that, the users may need to login using their database passwords as sometime auto-logon may not work. Other one is core CPanel update. If CPanel is updated as in Method 1 or automatically, it will replace this package. So, you will need to again follow this method to upgrade phpMyAdmin Cpanel WHM.

Load More Related Articles
Load More In Servers

2 Comments

  1. Jamie

    September 29, 2015 at 12:59 pm

    This actually worked! Can’t believe it! I updated my old phpmyadmin to latest using ssh.

    Reply

    • Mrinal Buddekar

      September 29, 2015 at 3:10 pm

      I am glad you could update phpmyadmin.

      Reply

Don't hesitate. Comment!

Check Also

Install CSF Firewall with Virtualmin Module

Managing Linux firewall can be pain without graphic interface. ConfigServer firewall comes…