How to upgrade to the latest phpMyAdmin version on Linux Cloud Servers

phpMyAdmin is one of the most used MySQL administration tools, more importantly in web hosting. It is a free and open-source tool, written in PHP, that can be used to manage both MySQL and MariaDB.

 

You can access your phpMyAdmin with servers IP and /phpmyadmin in a web browser and check the current version.

phpmyadmin1

 

See the instructions for upgrading the phpMyAdmin on Linux OS below.

 

1st procedure: Backup phpMyAdmin

  1. Back up your current phpMyAdmin folder by renaming it.

    # mv /usr/share/phpMyAdmin /usr/share/phpMyAdmin_old
    

    phpmyadmin2

  2. Create the same directory again and change to that with the below commands.

    # mkdir /usr/share/phpMyAdmin
    
    # cd /usr/share/phpMyAdmin
    

    phpmyadmin15

    phpmyadmin4

 

2nd procedure: Download and Extract phpMyAdmin

  1. To download the new phpMyAdmin, go to the below link and download the zip/tar.gz file of the new version phpMyAdmin with the wget command.

    https://www.phpmyadmin.net/downloads/

    # wget https://files.phpmyadmin.net/phpMyAdmin/5.0.2/phpMyAdmin-5.0.2-all-languages.zip
    

    phpmyadmin5

  2. Now extract with the below command.

    # unzip phpMyAdmin-5.0.2-all-languages.zip
    

    phpmyadmin6

  3. You should see a new folder phpMyAdmin-5.0.2-all-languages. Move the contents of this folder to /usr/share/phpMyAdmin by using the below commands to do the same.

    # mv phpMyAdmin-5.0.2-all-languages/* .
    

    phpmyadmin7

  4. You can now log back into phpMyAdmin and check the current version as we mentioned first.

    phpmyadmin8

    You may also see two errors as in the below image.

    phpmyadmin9

 

3rd procedure: Edit vendor_config.php to correct the errors

  1. Open vendor_config.php file.

    # vi /usr/share/phpMyAdmin/libraries/vendor_config.php
    

    phpmyadmin10

  2. Press CTRL + W and search for TEMP_DIR and Change line to

    define('TEMP_DIR', '/var/lib/phpmyadmin/tmp/');
    

    phpmyadmin11

  3. Press CTRL + W and search for CONFIG_DIR and change the line to:

    define('CONFIG_DIR', '/etc/phpmyadmin/');
    

    phpmyadmin12

  4. Save file and Exit.

  5. Now Reload or login again to the phpMyAdmin and ensure that the errors are gone.

    phpmyadmin13

 

Was this answer helpful? 0 Users Found This Useful

Related Articles

Complete List of Common Linux Server Commands

Mastering common Linux commands is the foundation of server management. File and Directory...

Detailed Tutorial on Linux Server Firewall Configuration

Firewall is the first line of defense for server security, and proper configuration is essential....

Steps and methods for handling zombie processes on Linux cloud servers

In daily use of Linux cloud servers, many website owners will encounter processes with a state of...

What to do if the cloud server port is occupied due to Nginx configuration error?

In the process of deploying or modifying Nginx configuration, many users often overlook a key...

Setting up Two-Factor Authentication for Linux Server

Why Use 2FA on a Linux Server? Despite their strong security, SSH keys are not infallible,...