{"id":2981,"date":"2022-01-24T17:19:18","date_gmt":"2022-01-25T01:19:18","guid":{"rendered":"https:\/\/192.168.1.30\/wordpress\/?p=2981"},"modified":"2022-01-24T17:19:18","modified_gmt":"2022-01-25T01:19:18","slug":"phpmyadmin-update-manually","status":"publish","type":"post","link":"https:\/\/spiffynasty.com\/blahblahblah\/phpmyadmin-update-manually\/","title":{"rendered":"PHPMyAdmin &#8211; Update Manually"},"content":{"rendered":"<h4 id='introduction'>Introduction<\/h4>\n<p><strong>Guide updated and tested in June 2021.<\/strong><\/p>\n<p>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.<\/p>\n<h4 id='1-back-up-phpmyadmin'>1. Back up phpMyAdmin<\/h4>\n<p>You should back up your current phpMyAdmin folder by renaming it.<\/p>\n<pre><code class='language-javascript' lang='javascript'>sudo mv \/usr\/share\/phpmyadmin\/ \/usr\/share\/phpmyadmin.bak\r\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>Create a new phpMyAdmin folder<\/p>\n<p>&nbsp;<\/p>\n<pre><code class='language-javascript' lang='javascript'>sudo mkdir \/usr\/share\/phpmyadmin\/\r\n<\/code><\/pre>\n<p>Change to directory<\/p>\n<pre><code class='language-javascript' lang='javascript'>cd \/usr\/share\/phpmyadmin\/\r\n<\/code><\/pre>\n<h4 id='2-download-and-extract-phpmyadmin'>2. Download and Extract phpMyAdmin<\/h4>\n<p><strong>Update Feb 2020:<\/strong> phpMyAdmin 5 has been released but it is only compatible with <strong>PHP 7.1<\/strong> and above. To find out your PHP version in command line, run <code>php -v<\/code>.<\/p>\n<p>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 (<a href='https:\/\/www.phpmyadmin.net\/news\/2020\/1\/8\/phpmyadmin-494-and-501-are-released\/'>read more<\/a>).<\/p>\n<ul>\n<li>For <strong>PHP 7.1<\/strong> and above, download <strong>phpMyAdmin 5.x<\/strong><\/li>\n<li>For <strong>PHP 5.5<\/strong> to <strong>PHP 7.4<\/strong>, download <strong>phpMyAdmin-4.9.7<\/strong><\/li>\n<\/ul>\n<p>Visit the <a href='https:\/\/www.phpmyadmin.net\/downloads\/'><strong>phpMyAdmin download page<\/strong><\/a> and look for the .tar.gz URL and download it using <code>wget<\/code>. 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 \ud83d\ude09). If you are having issues with phpMyAdmin 5.x, try phpMyAdmin-4.9.7 instead.<\/p>\n<pre><code class='language-javascript' lang='javascript'>sudo wget https:\/\/files.phpmyadmin.net\/phpMyAdmin\/5.1.1\/phpMyAdmin-5.1.1-all-languages.tar.gz\r\n<\/code><\/pre>\n<p>Now extract<\/p>\n<pre><code class='language-javascript' lang='javascript'>sudo tar xzf phpMyAdmin-5.1.1-all-languages.tar.gz\r\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>Once extracted, list folder<\/p>\n<p>&nbsp;<\/p>\n<pre><code class='language-javascript' lang='javascript'>ls\r\n<\/code><\/pre>\n<p>You should see a new folder <code>phpMyAdmin-5.1.1-all-languages<\/code><\/p>\n<p>We want to move the contents of this folder to <code>\/usr\/share\/phpmyadmin<\/code><\/p>\n<pre><code class='language-javascript' lang='javascript'>sudo mv phpMyAdmin-5.1.1-all-languages\/* \/usr\/share\/phpmyadmin\r\n<\/code><\/pre>\n<p>You can now log back into phpMyAdmin and check the current version. You may also see two errors:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2982\" src=\"https:\/\/192.168.1.30\/wordpress\/wp-content\/uploads\/2022\/01\/iwQoLhP.png\" width=\"1024\" height=\"649\" alt=\"phpMyadmin blowfish secret error and tempdir not writable error\" srcset=\"https:\/\/spiffynasty.com\/blahblahblah\/wp-content\/uploads\/2022\/01\/iwQoLhP.png 1024w, https:\/\/spiffynasty.com\/blahblahblah\/wp-content\/uploads\/2022\/01\/iwQoLhP-800x507.png 800w, https:\/\/spiffynasty.com\/blahblahblah\/wp-content\/uploads\/2022\/01\/iwQoLhP-300x190.png 300w, https:\/\/spiffynasty.com\/blahblahblah\/wp-content\/uploads\/2022\/01\/iwQoLhP-768x487.png 768w, https:\/\/spiffynasty.com\/blahblahblah\/wp-content\/uploads\/2022\/01\/iwQoLhP-500x317.png 500w, https:\/\/spiffynasty.com\/blahblahblah\/wp-content\/uploads\/2022\/01\/iwQoLhP-600x380.png 600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<h4 id='3-edit-vendorconfigphp'>3. Edit vendor_config.php<\/h4>\n<h5 id='31-cfgtempdir-tmp-is-not-accessible'>3.1. $cfg[\u2018TempDir\u2019] (.\/tmp\/) is not accessible<\/h5>\n<p>If you are seeing an error <em>The $cfg[\u2018TempDir\u2019] (.\/tmp\/) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.<\/em><\/p>\n<p>Open <code>vendor_config.php<\/code><\/p>\n<pre><code class='language-javascript' lang='javascript'>sudo nano \/usr\/share\/phpmyadmin\/libraries\/vendor_config.php\r\n<\/code><\/pre>\n<p>Press <code>CTRL<\/code> + <code>W<\/code> and search for <code>TEMP_DIR<\/code><\/p>\n<p>If you see something like below, delete it.<\/p>\n<p>\/usr\/share\/phpmyadmin\/libraries\/vendor_config.php<\/p>\n<pre><code>define(&#39;TEMP_DIR&#39;, ROOT_PATH . &#39;tmp&#39; . DIRECTORY_SEPARATOR);\r\n<\/code><\/pre>\n<p>Add new line:<\/p>\n<p>\/usr\/share\/phpmyadmin\/libraries\/vendor_config.php<\/p>\n<pre><code>define(&#39;TEMP_DIR&#39;, &#39;\/var\/lib\/phpmyadmin\/tmp\/&#39;);\r\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>Save file and exit. (Press <code>CTRL<\/code> + <code>X<\/code>, press <code>Y<\/code> and then press <code>ENTER<\/code>)<\/p>\n<p>&nbsp;<\/p>\n<h5 id='32-blowfishsecret'>3.2. blowfish_secret<\/h5>\n<p>You may also see an error <em>The configuration file now needs a secret passphrase (blowfish_secret).<\/em> The blowfish secret is used by phpMyAdmin for cookie authentication. <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2983\" src=\"https:\/\/192.168.1.30\/wordpress\/wp-content\/uploads\/2022\/01\/JHZfOC4.png\" width=\"114\" height=\"102\" alt=\"Blowfish secret\" \/><\/p>\n<p>Open <code>vendor_config.php<\/code><\/p>\n<pre><code class='language-javascript' lang='javascript'>sudo nano \/usr\/share\/phpmyadmin\/libraries\/vendor_config.php\r\n<\/code><\/pre>\n<p>Press <code>CTRL<\/code> + <code>W<\/code> and search for <code>CONFIG_DIR<\/code><\/p>\n<p>Change line to<\/p>\n<p>\/usr\/share\/phpmyadmin\/libraries\/vendor_config.php<\/p>\n<pre><code>define(&#39;CONFIG_DIR&#39;, &#39;\/etc\/phpmyadmin\/&#39;);\r\n<\/code><\/pre>\n<p>phpMyAdmin will now generate its own blowfish secret based on the install directory.<\/p>\n<p>Save file and exit. (Press <code>CTRL<\/code> + <code>X<\/code>, press <code>Y<\/code> and then press <code>ENTER<\/code>)<\/p>\n<h5 id='33-log-back-in'>3.3. Log back in<\/h5>\n<p>&nbsp;<\/p>\n<p>Now log back in to phpMyAdmin and ensure the errors are gone.<\/p>\n<p>&nbsp;<\/p>\n<p>If you are seeing an error <em>\u201cThe secret passphrase in configuration (blowfish_secret) is too short.\u201d<\/em>, see below.<\/p>\n<p>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.<\/p>\n<h4 id='4-cleanup'>4. Cleanup<\/h4>\n<p>You can now delete the tar.gz file and the empty folder.<\/p>\n<pre><code class='language-javascript' lang='javascript'>sudo rm \/usr\/share\/phpmyadmin\/phpMyAdmin-5.1.1-all-languages.tar.gz\r\nsudo rm -rf \/usr\/share\/phpmyadmin\/phpMyAdmin-5.1.1-all-languages\r\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>And if you\u2019re certain your new phpMyAdmin install is working correctly you can delete the backup folder.<\/p>\n<p>&nbsp;<\/p>\n<pre><code class='language-javascript' lang='javascript'>sudo rm -rf \/usr\/share\/phpmyadmin.bak\r\n<\/code><\/pre>\n<p>Hurrah!<\/p>\n<p>&nbsp;<\/p>\n<h4 id='blowfish-secret-error-too-short'>Blowfish Secret Error \u201cToo Short\u201d<\/h4>\n<p>If you are seeing an error <em>\u201cThe secret passphrase in configuration (blowfish_secret) is too short.\u201d<\/em><\/p>\n<p>Open <code>blowfish_secret.inc.php<\/code>:<\/p>\n<pre><code class='language-javascript' lang='javascript'>sudo nano \/var\/lib\/phpmyadmin\/blowfish_secret.inc.php\r\n<\/code><\/pre>\n<p><a href='https:\/\/passgen.co\/?pw=32&amp;a=1'>Click here to generate a 32-character random phrase.<\/a><\/p>\n<p>Copy it and paste it into blowfish_secret.inc.php.<\/p>\n<p>\/var\/lib\/phpmyadmin\/blowfish_secret.inc.php<\/p>\n<pre><code class='language-php' lang='php'>&lt;?php\r\n$cfg[&#39;blowfish_secret&#39;] = &#39;32_char_random_phrase_here&#39;;\r\n<\/code><\/pre>\n<p>Save and exit (press <code>CTRL<\/code> + <code>X<\/code>, press <code>Y<\/code> and then press <code>ENTER<\/code>)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction 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 &nbsp; Create a new phpMyAdmin folder &nbsp; 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[27],"tags":[],"class_list":["post-2981","post","type-post","status-publish","format-standard","hentry","category-nas"],"_links":{"self":[{"href":"https:\/\/spiffynasty.com\/blahblahblah\/wp-json\/wp\/v2\/posts\/2981","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/spiffynasty.com\/blahblahblah\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/spiffynasty.com\/blahblahblah\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/spiffynasty.com\/blahblahblah\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/spiffynasty.com\/blahblahblah\/wp-json\/wp\/v2\/comments?post=2981"}],"version-history":[{"count":1,"href":"https:\/\/spiffynasty.com\/blahblahblah\/wp-json\/wp\/v2\/posts\/2981\/revisions"}],"predecessor-version":[{"id":2984,"href":"https:\/\/spiffynasty.com\/blahblahblah\/wp-json\/wp\/v2\/posts\/2981\/revisions\/2984"}],"wp:attachment":[{"href":"https:\/\/spiffynasty.com\/blahblahblah\/wp-json\/wp\/v2\/media?parent=2981"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/spiffynasty.com\/blahblahblah\/wp-json\/wp\/v2\/categories?post=2981"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/spiffynasty.com\/blahblahblah\/wp-json\/wp\/v2\/tags?post=2981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}