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

2020-04-16 By Aaron 4883 Views linux phpmyadmin development
0 reviews

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


Related Tutorials

What do you think about this article?

Rate this article
LayerStack Promotion
Need assistance?

Try this guide to receive free bundled services at signup on a new free account.

Sign Up

Your Feedback Is Important

We hope you’ll give the new products and updates a try. If you have an idea for improving our products or want to vote on other user ideas so they get prioritized, please submit your feedback on our Community platform. And if you have any questions, please feel free to ask in the Community or contact our Technical Support team.