Manually upgrade phpMyAdmin

How to Manually Upgrade phpMyAdmin

Last updated on | 473 replies

Whether your repository is too slow to deliver the latest version of phpMyAdmin or you are having compatibility issues with your current version, in this article we will manually download and install the latest version of phpMyAdmin.


Guide updated and tested in June 2021.

This guide has been tested from Ubuntu 20.10 to 16.04. It should also work for other Debian-based distributions without issue. For CentOS users, please refer to the comments section at the end of this page as commands will be different. I will try to update this guide for CentOS as soon as I get the chance to test it. In the meantime, if you have any suggestions on how to improve this guide, please let me know in the comments.

1. Back up phpMyAdmin

You should back up your current phpMyAdmin folder by renaming it.

sudo mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak

Create a new phpMyAdmin folder

sudo mkdir /usr/share/phpmyadmin/

Change to directory

cd /usr/share/phpmyadmin/

2. Download and Extract phpMyAdmin

Update Feb 2020: phpMyAdmin 5 has been released but it is only compatible with PHP 7.1 and above. To find out your PHP version in command line, run php -v.

phpMyAdmin version 4.x is now in the LTS phase, where only security fixes and critical bug fixes are made. Users are advised to migrate to version 5 (read more).

  • For PHP 7.1 and above, download phpMyAdmin 5.x
  • For PHP 5.5 to PHP 7.4, download phpMyAdmin-4.9.7

Visit the phpMyAdmin download page and look for the .tar.gz URL and download it using wget. In this guide we are using version 5.1.1, released June 2021. If a later version is now available, make sure to change the commands below to match (and let me know in the comments so I can update the guide 😉). If you are having issues with phpMyAdmin 5.x, try phpMyAdmin-4.9.7 instead.

sudo wget

Now extract

sudo tar xzf phpMyAdmin-5.1.1-all-languages.tar.gz

Once extracted, list folder


You should see a new folder phpMyAdmin-5.1.1-all-languages

We want to move the contents of this folder to /usr/share/phpmyadmin

sudo mv phpMyAdmin-5.1.1-all-languages/* /usr/share/phpmyadmin

You can now log back into phpMyAdmin and check the current version. You may also see two errors:

phpMyadmin blowfish secret error and tempdir not writable error

3. Edit vendor_config.php

3.1. $cfg[‘TempDir’] (./tmp/) is not accessible

If you are seeing an error The $cfg[‘TempDir’] (./tmp/) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.

Open vendor_config.php

sudo nano /usr/share/phpmyadmin/libraries/vendor_config.php

Press CTRL + W and search for TEMP_DIR

If you see something like below, delete it.


Add new line:

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

Save file and exit. (Press CTRL + X, press Y and then press ENTER)

3.2. blowfish_secret

You may also see an error The configuration file now needs a secret passphrase (blowfish_secret). The blowfish secret is used by phpMyAdmin for cookie authentication. Blowfish secret

Open vendor_config.php

sudo nano /usr/share/phpmyadmin/libraries/vendor_config.php

Press CTRL + W and search for CONFIG_DIR

Change line to

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

phpMyAdmin will now generate its own blowfish secret based on the install directory.

Save file and exit. (Press CTRL + X, press Y and then press ENTER)

3.3. Log back in

Now log back in to phpMyAdmin and ensure the errors are gone.

If you are seeing an error “The secret passphrase in configuration (blowfish_secret) is too short.”, see below.

If you are having issues with phpMyAdmin 5, try phpMyAdmin-4.9.7 instead as this is the latest stable release for PHP 7.0 and lower and MySQL 5.4 and lower.

4. Cleanup

You can now delete the tar.gz file and the empty folder.

sudo rm /usr/share/phpmyadmin/phpMyAdmin-5.1.1-all-languages.tar.gz
sudo rm -rf /usr/share/phpmyadmin/phpMyAdmin-5.1.1-all-languages

And if you’re certain your new phpMyAdmin install is working correctly you can delete the backup folder.

sudo rm -rf /usr/share/phpmyadmin.bak


Blowfish Secret Error “Too Short”

If you are seeing an error “The secret passphrase in configuration (blowfish_secret) is too short.”


sudo nano /var/lib/phpmyadmin/

Click here to generate a 32-character random phrase.

Copy it and paste it into

$cfg['blowfish_secret'] = '32_char_random_phrase_here';

Save and exit (press CTRL + X, press Y and then press ENTER)

Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie.

p.s. I increased my AdSense revenue by 200% using AI 🤖. Read my Ezoic review to find out how.

473 replies

Leave a reply

Your email address will not be published. Required fields are marked *

  1. What I get is a 404 error. I can see all the files are there so it looks like a permissions issue, had to run CHMOD, CHOWN and create a tmp folder. Works now.

  2. Thank you very much for your tutorial that helped me a lot. Upgrade from Ubuntu 18 to 20 make a mess, but is sorted

  3. Thank you:
    I’ve just followed the instructions and used the latest version 5.1.1 and all is now fixed
    I did have to make the changes in the vendor_config.php to remove the warnings.
    PRETTY_NAME=”Raspbian GNU/Linux 10 (buster)”
    NAME=”Raspbian GNU/Linux”
    VERSION=”10 (buster)”

  4. Work ! thank you

    2021 — CentOS 7 and Php 7.4 Phpmyadmin 5.1.1

    sudo mv /usr/share/phpMyAdmin/ /usr/share/phpMyAdmin.bak

    sudo mkdir /usr/share/phpMyAdmin/

    cd /usr/share/phpMyAdmin/

    sudo tar xzf phpMyAdmin-5.1.1-all-languages.tar.gz

    sudo mv phpMyAdmin-5.1.1-all-languages/* /usr/share/phpMyAdmin

    sudo mkdir /var/lib/phpMyAdmin/tmp/
    sudo chown -R apache:apache /var/lib/phpMyAdmin/tmp
    sudo chmod -R 0755 /var/lib/phpMyAdmin/tmp/

    sudo nano /usr/share/phpMyAdmin/libraries/vendor_config.php

    define(‘TEMP_DIR’, ‘/var/lib/phpMyAdmin/tmp/’);

    define(‘CONFIG_DIR’, ‘/etc/phpMyAdmin/’);


  5. Excellent article, Thank you.
    If anyone found some error after doing every step in this article, you may found a message like “The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. Find out why. Or alternately go to ‘Operations’ tab of any database to set it up there.”
    Don’t panic, first, you should log in as root and scroll down to found the message that I mentioned and then click find out why and click create a database for configuration like something like that, and waiting for creating some table, it shows OK, finally, you can use phpMyAdmin normally. 🙂

  6. bro, you are really save my time.. running flawlesly, thanks a lot.. I was implement it on my dev and production server..

  7. Awesome instructions, thanks.
    I particulary like the way you give us both the exact syntax and a clear explanation about what we’re doing.

  8. You should also consider to delete the default setup UI, it is a security risk.
    Just delete the directory: /usr/share/phpmyadmin/setup/

  9. This is the first How-To I have followed to the letter that worked the first time in a long time! Thank you for the effort.

  10. That is a great tutorial. But in my case when trying to open phpMyAdmin, it gave me a Permission denier error. So I had to run chmod 777 /var/lib/php/session/ then it worked.

  11. error
    The $cfg[‘TempDir’] (/usr/share/phpmyadmin/tmp/) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.

  12. Great Tutorial ! I don’t know what exactly happened but after closely following the instructions to install phpmyadmin I get the infamous 4O4 ERROR – URL not found on this server. Every other thing worked as per the instructions.

  13. Hello, I have a question, I really don’t know if you can help me, but if you do, I would appreciate it too much! The problem is the following: I have a VPS, in it I put the Phpmyadmin, mysql, etc …, I also installed the OGP (Open Game Panel), the fact is that when I create the database of one of my server games, everything is fine, it connects well and everything, but when I enter the game and try to register, it does not let me, I get that the account “supposedly already exists”, but in reality it does not exist, a table must be created in the table ” users ” with the user’s data, but it is not like that, I get that error, if you could help me I would appreciate it, I know it does not have much to do with what you published, but I am new to this and I do not know how to fix it .

    Postscript: It is not the game, since the game is called “SAMP” (San Andreas MultiPlayer) and actually in other VPS if it works well, but not in mine, then the problem must be with MySQL or PhpMyAdmin, but I really don’t know.

  14. One problem with 5.0.2 was I had no tmp directory under /var/lib/phpMyAdmin (it is phpMyAdmin not phpmyadmin). Created the tmp directory, changed ownership as apache:apache, made sure it had write permissions. Had to restart httpd for these config changes. Then errors went away.
    When I set tmp pointer, site stopped working (did not exist – I did not confirm first).
    5.5.65-MariaDB – MariaDB Serve
    Apache/2.4.6 (CentOS) PHP/7.3.22
    phpMyAdmin: 5.0.2

  15. Great. I hate it when they keep updating shit so fast, and compatibility errors start occurring, but I love it when guys like you give us an simple fix.

  16. wow, just fantastic steps, every step was described, even how to save and exit editor in linus, Thank you

  17. This is one of the best support pages I have experienced in my entire coding life span. I am 80 years old, I started learning how to code 5 years ago and in my humble opinion it is not easy, however it becomes easier to understand each day I continue to learn. This particular page was extremely helpful with your detailed and specific instructions/guidelines. They (instructions/guidelines) were easy to understand and follow, I did not have to go to another page to get explanations for anything. THANKS, I really like your style.

  18. Unfortunately your tutorial seems to have made things worse, with an error coming up:

    Error during session start; please check your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser.

    session_write_close(): write failed: No space left on device (28)

    session_write_close(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/sessions)

    If anyone has any answers, then would be much appreciated!

  19. i always look at digitalocean for good tutorial for this kind of job. now i found another one.

    truly thanks

  20. Muchas Gracias el phpmyadmin me tenia sufriendo y no sabia porque era pero gracias a tu
    pagina lo pude soluciona un saludo esta muy completa la explicacion.

  21. Hola realice los camnios y todo funciono perfecto, pero Edite vendor_config.php y dejo de funcionar y ya no puedo hacer inicio en phpmyadmin.

    Que puedo hacer para corregir.


  22. Thank you very much.

    This tutorial is very helpful with all the details and commands we need to fix the problem.

  23. Hello .. I am Using Google Cloud..I Just Updated Php Version to 7.3 and followed your process but after doing that when i try to log in phpmyadmin it says..PHP 7.1.3+ is required.
    Currently installed version is: 7.0.33-0+deb9u7….But When i check through SSH It says 7.3 ..Please Help what to do..

    1. You may have updated the CLI PHP version that runs in command line only. Ensure you have also updated PHP for Apache or Nginx.

      To find out which PHP version the web server is using, create a new PHP file in your document root called info.php with the following:


      Load that in the browser and it will report which PHP version you are using.

  24. This is perfect! But if you’re running NGINX or Apache2 and you assign these services to a user, you’ll need to change the ownership of /var/lib/phpmyadmin/tmp &amp;&amp; /var/lib/phpmyadmin/ &amp;&amp; /var/lib/phpmyadmin/ to your user.

    Where user == Your User Name

    sudo chown user.user /var/lib/phpmyadmin/tmp
    sudo chown root.user /var/lib/phpmyadmin/
    sudo chown root.user /var/lib/phpmyadmin/
  25. A solução mais simples e rápida que encontrei até agora. Parabéns.

    E, para quem se interessar e tiver o mesmo problema, utilizao Ubuntu 18.04 em WSL (Windows 10 Home), PHP 7.4, Apache2 e Mysql.

    Muito obrigado e sucesso!
    Receba um abraço deste brasileiro.
    Luiz Vidaum
    São Paulo/Brasil

  26. Perfect tutorial. I have upgraded in 2 minutes. No issues at all. I didnt get that blowfish warning too.

  27. Uhll! I think I’m close! 90% of my bugs disappeard. The only issue (new one) is “Failed to read configuration file!”

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

    I was trying to find a solution before reaching you. The problem is that there is a message “This usually means there is a syntax error in it, please check any errors shown below.”, but the field bellow is empty. Any idea what could be? Thx in advance.

  28. Hi, after doing everything you told me to do, I still got the exact same two errors… can you help me?

  29. Hi sorry for this, everything works and I can clearly see the latest 5.0.2 version, but I have the issue that if I run “apt update” it tells me that my installed version is 4.6.6 and fails to upgrade to the proposed 4.9.5. Is there a way to fix my apt in a way that it will understand that my version is now 5.0.2? many thanks

    1. Yes, I have exactly the same issues here. After manually updating PMA to 5.0.4 I was surprised to see that it was downgraded to 4.6.6deb5ubuntu0.5 again.

  30. hello i have this error which is displayed at the bottom of my page how to fix it please
    $cfg[‘TempDir’] (/var/lib/phpmyadmin/temp/) is not accessible. phpMyAdmin is unable to cache models and therefore will be slow.

  31. Superb – you anticipated all the hiccups I would find. I never had to look anywhere else for once! lol

    Thanks mate.

  32. thanks alot, I was about to go back to selling drugs….. but then again it happens with every bump in the way

  33. I’ve installer Php FPM 7, 7.1 , 7.2, 7.3 but phpmyadmin still uses php5.6 so I can’t upgrad to v5.xx . How can I change the version of php that phpmyadmin uses? Thanks

  34. Thank you sir!

    If possible suggest to audience to wget to a different directory, maybe home but not /usr/share/phpmyadmin.

    Well done. I appreciate this!

  35. Thank you. Sorted out my Raspberry Pi install. Nice easy to follow instructions.


  36. Small correction is about caps.

    On CentOS, phpmyadmin = phpMyAdmin on all folders.

    sudo mkdir /var/lib/phpMyAdmin/tmp/
    sudo chown -R apache:apache /var/lib/phpMyAdmin/tmp
    sudo chmod -R 0755 /var/lib/phpMyAdmin/tmp/

    All working great

  37. Hi, I update to phpmyadmin-5.0.1 in centos 8, but the 2 errors doesn’t disappear… this dir /etc/phpmyadmin/ don’t exist and my server can’t create it..

    cd /var/lib/phpmyadmin/tmp/

    -bash: cd: /var/lib/phpmyadmin/tmp/: No such file or directory

    sudo mkdir /var/lib/phpmyadmin/tmp/

    mkdir: cannot create directory ‘/var/lib/phpmyadmin/tmp/’: No such file or directory

    what can I do?

    1. I think the default phpMyAdmin directories are different on CentOS. Try searching for the directories.

      find / -type d -name 'phpmyadmin'

      You may have to manually list some directories until you find /tmp/ and the install directory.

  38. Honestly, The Best Tutorial about Ubuntu I’ve seen before , Specially for beginners . Thanks for this beginner friendly How To .

  39. Thank you. Works great! And for the all lazy men as myself you can use something like this bash script for automatic upgading to latest version:

    mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak
    mkdir /usr/share/phpmyadmin/
    cd /usr/share/phpmyadmin/
    wget -q
    tar xzf ./phpMyAdmin-latest-all-languages.tar.gz
    rm ./phpMyAdmin-latest-all-languages.tar.gz
    pma_dir=$(ls ./)
    mv ${pma_dir}/* /usr/share/phpmyadmin
    rm -rf ${pma_dir}
    sed -ri “s/(.)TEMP_DIR(.)/define(‘TEMP_DIR’, ‘\/var\/lib\/phpmyadmin\/tmp\/’)\;/g”
    1. sed -ri “s/(.)TEMP_DIR(.)/define(‘TEMP_DIR’, ‘\/var\/lib\/phpmyadmin\/tmp\/’)\;/g”
      -bash: syntax error near unexpected token `(‘

  40. Hey, that was an absolute piece of cake! Worked great exactly as following your instructions. I have my own server i performed these instructions on. Thanks so much.

  41. Awesome job. Many people would give a solution like this without the step-by-step commands required (since they’re mostly simple), but you went that extra mile and it makes things just that much easier. This method of upgrading phpmyadmin worked perfectly – thanks!

  42. Perfect!!!
    Works Great The First Time!!!
    Didn’t cause any additional errors or issues!!!!!

  43. Wonderful. I clean case of “damn, wonder if anyone else has… google … working solution”.
    Extra good to cover those possible errors and explain them. Saved me time and was educating too. Thanks!

  44. Peope were looking for this solution on other websites, a lot of wrong or temporary answers that leads to other errors, but this article… Awesome, thanks!

  45. Glad i made a backup.
    the new phpmyadmin is only giving me a white screen (even tried copying the did not help)
    so change the dir to and renamed the backup folder back to phpmyadmin
    but with the old one i also had a blowfish error
    this define(‘CONFIG_DIR’, ‘/etc/phpmyadmin/’); is giving an error 500 when changed in the vendor config file

  46. Thanks for this.
    Do you also have a solution where, once logged out, you can’t immidiately log-in again? I have to wait some time like an hour or so. I can’t find a good solution for that.


  47. This was excellent – clearly written and bang up to date and all worked smoothly and well. Thank you so much!

  48. THANK YOU!! I have seen and tried to follow so many TUT’s, and too often they’re missing some final step, or outdated, or just not helpful. Within minutes my annoying MYSQL server has morphed into an error free and comfortable environment in which we can work.

    Really, excellent job!

  49. I encountered multiple errors after installing the default PhpMyAdmin version 4.6.6.deb5 that came with my Ubuntu 18.04 distribution. Your guide solved them all in one fell swoop. Excellent instructions and many thanks!

  50. It would have been absolutely possible to figure that out, but this fine turn-by-turn manual sped up the whole operation in the most pleasant way.

    T H A N K _ Y O U very much

  51. How to automate this on a simple script:

    $ nano

    echo "Backing up"
    mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak
    echo "Getting lastest PHPMyAdmin version..."
    mkdir /usr/share/phpmyadmin/
    cd /usr/share/phpmyadmin/
    tar xzf phpMyAdmin-
    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-
    rm -rf /usr/share/phpmyadmin/phpMyAdmin-
    rm -rf /usr/share/phpmyadmin.bak
    echo "Done!"
    1. For future reference, this is the updated script to download the last stable version of PHPMyAdmin:

      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/
      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!”

  52. It didn’t work for me.
    Getting this work
    The $cfg[‘TempDir’] (./tmp/) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.

    1. This was happening to me too. I figured out it was a permissions problem. Here’s what solved it for me, use at your own risk (make sure not to include the $, it just shows the line is a command):

      $ cd /var/lib/phpmyadmin
      $ sudo chmod 775 tmp

  53. Perfect solution! Thanks! You might mention that, for Steps 2 and 4, the substring “all-languages” can be replaced with “english” in any command with that substring. The installation will then be a bit lighter, without the several MB of language files that are not needed when it’s known that only the English interface will be used.

  54. works perfectly on ubuntu 18.10.
    It seems that the phpmyadmin package on ubuntu isn’t tested before it released on apt.
    Yet another reason for me to move to Arch..

  55. Worked great! For some reason the copy past of the wget command did not work. I had to copy the URL from the website to download it. Same version you used though.

  56. Todo el tutorial ha funcionado muy bien ; pero tengo este mensaje:
    El almacenamiento de la configuración de phpMyAdmin ha sido desactivado.

  57. Very well, for my part, step 3 is not to do it is she who created the problems. so I cancel the 3.

    Ubunut Budgi 18.04.2 LTS

  58. Just for future visitors, to me it said newer version is 4.8.5 at current date.
    I did the same operations using 4.8.5 instead of 4.8.4 and it worked like a charm.
    Thanks for your help really!

  59. The best guide. I like the step by step as I’m noob in this server setting.

    My PHPMyAdmin is working now! Yeay! Thanks a lot!

  60. Accurate, simple and straight to the point. This is how every guide should be done. A very good job, mate! Thanks a lot!

  61. Nice guide!
    thanks for work.

    i hav got a warning after proccess this guide:
    ” Auf das $cfg[‘TempDir’] (./var/lib/phpmyadmin/tmp/) kann nicht zugegriffen werden.”
    => access denied.
    But i hav chown usr “www-data” & grp “www-data”.

  62. Worked like a champ. Excellent directions. This is Jan 1, 2019 and they still haven’t updated the repositories! Thanks for putting this together.

  63. Hello. This worked perfectly. Thank you for posting this, it’s the only real answer to this that I’ve been able to find.

  64. Thx worked nicely but is still get :
    The secret passphrase in configuration (blowfish_secret) is too short.
    Any tips?

    1. You probably missed the second edit :

      where he changes:
      define(‘CONFIG_DIR’, ‘ ‘);

      define(‘CONFIG_DIR’, ‘/etc/phpmyadmin/’);

  65. Clear, concise & accurate instructions.
    Great use of the command line and a ‘workflow’ process.
    And it worked 🙂

  66. I did reinstall mysql and phpmyadmin multiple times in my raspberry pi ubuntu 18.04 server. phpmyadmin still had issues, but this manual totally helped. Many thanks

  67. After a few months of aggravating error messages you solved the problem! This worked just as you said and is wonderful!!!!!! Can’t thank you enough.

  68. hello,
    please help, i have mysql 8, php 7.2.7
    i installed phpmyadmin 4.6.6 and i had this errors, so i upgraded to 4.8.3 like you did but the errors still exists.
    please help

    The phpMyAd*min configuration storage is not completely configured,
    some extended features have been deactivated. Find out why. Or
    alternately go to ‘Operations’ tab of any database to set it up
    there. Open new phpMyAdmin window.
    mysqli_real_connect(): (HY000/1045): Access denied for user
    ‘phpmyadmin’@’localhost’ (using password: YES).
    Connection for controluser as defined in your configuration failed.*

  69. Thanks, excellent. Just a problem : the automatically generated blowfish secret phrase was too short : 24 chars, yet 32 needed. Modified in var/lib/phpmyadmin/ (Raspbian)

  70. I have read tens of guides for Linux and no one was so simple and useful. I’d want to all guides was like this. Thank you.
    (sorry for my English, i’m not a native speaker)

  71. Thank you, i really appreciate your tutorial. The errors have been bugging me for a while, now all is fixed. Best regards and keep up the good work.

  72. Within the created DIR "/usr/share/phpmyadmin" is a file calles “”.
    Open it, add a 32char alphanumeric string as value of “cfg[blowfish_secret]” and safe it as “”.

    While in the editing of


    DO NOT replace

    "define('CONFIG_DIR', '');" by "define('CONFIG_DIR', '/etc/phpmyadmin/');".

    Instead take the path to the just altered “”. Take care, (maybe) because of the updating-process, there are minimum 2 other “” on your system under
    1) “/var/lib/phpmyadmin” (is empty)
    2) “/etc/phpmyadmin/” which will load the “blowfish”-file from “/var/lib/phpmyadmin”.

    In my case it was just possible to satisfy the error-message when pointing to “/usr/share/phpmyadmin/” with filled “blowfish_secret” as “CONFIG_DIR”.

    Finally, thank you very much for this guide.

  73. Hello,

    It was working till yesterday, Now i cant find and setting up blowfish_secret in this blog

    1. There is an easier method to get rid of that error. Open /usr/share/phpmyadmin/libraries/vendor_config.php, search for CONFIG_DIR and change it to:

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

  74. A quicker fix for the blowfish_secret :

    sudo nano /usr/share/phpmyadmin/libraries/vendor_config.php

    Press CTRL + W and search for CONFIG_DIR

    Change line to:
    define(‘CONFIG_DIR’, ‘/etc/phpmyadmin/’);

  75. Wonderful straight forward, easy to follow write up. Very well done. And most importantly, thank you for posting this tip to fix this issue for Ubuntu 18.04 users! (Not that it matters as it’s the same Ubuntu as in pure Linux, but implemented this fix in Windows Subsystem for Linux – Ubuntu 18.04)

    1. All I can recommend is that you restore your backup.

      sudo mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.del

      sudo mv /usr/share/phpmyadmin.bak/ /usr/share/phpmyadmin

      Check that phpMyAdmin is working again.

  76. Yo realice todos los pasos pero me dejo un warning que dice
    El archivo de configuración ahora necesita una frase secreta (blowfish_secret).

    1. Buscando como arreglaro, edite el archivo config.default.php y en la linea $cfg[‘blowfish_secret’]=’ColocarValorAleatorio’

      $cfg[‘blowfish_secret’] = ‘a0sfo49nadf89fa3s8f789sf78asb7p1587balz’

      segun esto se tiene que colocar un valor aleatorio, no se si sea correcto esto, sin embargo a mi me funciono.

      NOTA: para buscar la ubicacion del archivo
      sudo find / -name config.default.php