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.
- Login to WHM as root.
- When at Home, go to CPanel.
- 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.
Assuming you have root credentials, login to shell (SSH) as root user.
Issue following command to change directory to Cpanel,
Rename old phpMyAdmin folder by command
mv phpMyAdmin backup_phpmyadmin
Pull new phpMyAdmin zip package using
Get link to new package from here https://www.phpmyadmin.net/downloads/ . I used version 4.4.15; so,
Extract the zip using,
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,
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,
Edit config file
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.