Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Linux Tutorials»How to Manually Upgrade phpMyAdmin on Ubuntu

    How to Manually Upgrade phpMyAdmin on Ubuntu

    By RahulFebruary 1, 20192 Mins ReadUpdated:September 27, 2019

    I have running Ubuntu 18.04 on my workstation. I have the phpMyAdmin older version installed on it. Initially, the phpMyAdmin was installed through the apt package manager.

    Advertisement

    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 Latest phpMyAdmin

    Now, download the latest phpMyAdmin archive file from its official download page. During last update of this article phpMyAdmin 4.8.5 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.

    Manually Upgrade phpMyAdmin

    All done. In conclusion, you have the latest phpMyAdmin running on your Ubuntu system.

    phpmyadmin
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    An Introduction to the “./configure” Command: Compiling Source Code in Linux

    Getting Started with Linux Command line: The Beginning

    Backing Up Your Linux System with Rsync: A Step-by-Step Guide

    View 22 Comments

    22 Comments

    1. João on March 19, 2022 4:51 pm

      Thank you, but I’m having error

      PHP 7.1.3+ is required.
      Currently installed version is: 7.0.33-57+ubuntu18.04.1+deb.sury.org+1

      when I run php –version I have 7.4

      Which php version does phpmyadmin uses?

      Reply
      • Rahul on March 23, 2022 5:50 am

        Check what PHP version is active in Apache: https://tecadmin.net/create-phpinfo-file/

        Reply
    2. Iman on March 10, 2022 5:38 am

      Thank you

      Reply
    3. sathiyaraj on January 21, 2022 11:43 am

      Nice article. But some code errors occurred. (Ex) – sudo mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak its worng (sudo mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.pak)

      Reply
    4. Amine on October 17, 2021 4:43 pm

      I have always been using this post for years, to install the new versions of phpmyadmin.
      Thank you so mutch.

      Reply
    5. Daniel Gutiérrez on August 5, 2021 5:44 pm

      Thank you!! it worked great.

      Reply
    6. TomakataABC on July 22, 2021 12:34 pm

      Helped a lot, ty ^^

      Reply
    7. armel sanou on July 7, 2021 9:46 am

      Thanks a lot, my problem has been perfectly after following your instructions.

      Reply
      • armel sanou on July 7, 2021 9:47 am

        *perfectly solved I means

        Reply
    8. Glen on July 6, 2021 5:09 am

      Brilliant! Thanks. Just remember to log back into phpmyadmin after you make the changes.

      Reply
    9. Venkatesh on May 11, 2021 6:22 am

      thanks for this article

      Reply
    10. B.Singh on March 5, 2021 5:58 pm

      Thanks a ton. Helped me a lot.

      Reply
    11. Leon Zak on January 11, 2021 8:08 pm

      Thank you.

      Reply
    12. Pankaj Vig on March 5, 2020 5:41 pm

      Great work! You made it so easy! 🙂

      Reply
    13. Rualt on March 5, 2020 3:35 pm

      Thanks. It was a lot easier than I expected.

      Reply
    14. Arturo on November 27, 2019 4:25 pm

      Excellent article, impeccable, clear and perfect! It helped me and it was very simple following your instructions. Greetings from Peru!

      Reply
    15. Ruslan on October 14, 2019 8:08 pm

      Thank you, bro!
      Shortly and clear.
      I had no problem when made upgrade

      Reply
    16. garsax on September 27, 2019 9:38 am

      echo
      echo “Backing up”
      mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak

      echo “Getting lastest PHPMyAdmin version…”
      mkdir -p /usr/share/phpmyadmin/
      cd /usr/share/phpmyadmin/
      wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz
      tar xzf phpMyAdmin-latest-all-languages.tar.gz
      mv phpMyAdmin-*/* /usr/share/phpmyadmin

      echo “Updating vendor_config”
      sed -i -r “s/(‘TEMP_DIR’\s*,)[^\)]*/\1 ‘\/var\/lib\/phpmyadmin\/tmp\/’/” /usr/share/phpmyadmin/libraries/vendor_config.php
      sed -i -r “s/(‘CONFIG_DIR’\s*,)[^\)]*/\1 ‘\/etc\/phpmyadmin\/’/” /usr/share/phpmyadmin/libraries/vendor_config.php

      echo “Cleaning up…”
      rm /usr/share/phpmyadmin/phpMyAdmin-latest-all-languages.tar.gz
      rm -rf /usr/share/phpmyadmin/phpMyAdmin-*
      rm -rf /usr/share/phpmyadmin.bak

      echo “Done!”
      echo

      Reply
    17. John on September 5, 2019 10:46 pm

      This was a tremendous help to me. I did have one error after installing the new version.

      “File ./vendor/autoload.php missing or not readable. Most likely you did not run Composer to install library files”

      I had to run. composer update –no-dev. within the phpmyadmin directory.

      https://www.digitalocean.com/community/questions/file-vendor-autoload-php-missing-or-not-readable-most-likely-you-did-not-run-composer-to-install-library-files

      Reply
    18. Luis Alvarenga on August 20, 2019 4:19 pm

      Excellent article
      it served me a lot like all your articles
      many thanks

      Reply
    19. Madge on August 11, 2019 6:15 am

      Nice and easy thank you so much

      Reply
    20. Ahmed Bermawy on April 23, 2019 12:13 pm

      Thanks for this article
      I have tried other articles and not works with me
      you saved my time

      Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Error: EACCES: permission denied, scandir (Resolved)
    • How To Install Python 3.11 on Ubuntu 22.04 / 20.04
    • How to Install Python 3.11 on Amazon Linux 2
    • An Introduction to the “./configure” Command: Compiling Source Code in Linux
    • How to Install PHP 8.x on Pop!_OS
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.