Automatically update phpMyAdmin

I’m running phpMyAdmin to manage the MySQL databases for the hosting I manage, and I need to keep it up to date to avoid vulnerabilities, bugs, etc.

Or mainly because I want to see up to date in the version box.

I run this script weekly to keep my version up to date:


$cmd = "cd /home/stephan/www/secret_folder/hidden; git clone --depth=1 --branch=STABLE git:// && cp -r phpmyadmin/* MyPHPMyAdmin/ && rm -rf phpmyadmin";

I keep phpMyAdmin in an hidden folder, protected by a password, because a lot of scripts try to access it.

So, if the URL of your phpMyAdmin instance is,

and is stored in


the script above will fetch the latest stable release, and copy it OVER your existing version, to keep all your settings intact.

Run it via cron and you’re done. This script has been running for more than 1 year without any problem.