phpMyAdmin is a popular web-based tool for managing MySQL databases. Over time, new versions of phpMyAdmin are released to address security issues, introduce new features, and improve overall performance. This article will guide you through the steps to manually upgrade phpMyAdmin on an Ubuntu system.
phpMyAdmin installation via Apt package manager create multiple directories:
- /etc/phpmyadmin – Configuration files
- /var/lib/phpmyadmin – Library and tmp directries
- /usr/share/phpmyadmin – Main phpMyAdmin installation
Step 1: Backup phpMyAdmin
You should take a back up of your current phpMyAdmin directory. However, I have just renamed it to phpmyadmin.bak at the same location.
sudo mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak
Step 2: Download the Latest Version of phpMyAdmin
Now, download the latest phpMyAdmin archive file from its official download page. During last update of this article phpMyAdmin 5.2.1 is latest version available for download.
wget www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.zip unzip phpMyAdmin-latest-all-languages.zip
You will see a directory phpMyAdmin-[VERSION]-all-languages in the current location. Move this latest directory to the appropriate location.
sudo mkdir /usr/share/phpmyadmin sudo mv phpMyAdmin-*/* /usr/share/phpmyadmin/
Step 3: Update Configuration
As I told the existing phpMyAdmin was installed with Apt package manager. Therefore you need to specify the TEMP_DIR and CONFIG_DIR location under the vendor_config.php file.
Edit vendor_config.php file in your favorite text editor
sudo vim /usr/share/phpmyadmin/libraries/vendor_config.php
and update the following values.
define('TEMP_DIR', '/var/lib/phpmyadmin/tmp/'); define('CONFIG_DIR', '/etc/phpmyadmin/');
Save the file and access the phpMyAdmin in a web browser.
Upgrading phpMyAdmin manually might seem daunting at first, but following the steps laid out in this guide should make the process smoother. Always remember to back up your data and configurations before proceeding with any upgrades. Regularly checking for updates ensures you’re leveraging the latest features and security fixes, keeping your database management tasks efficient and secure.