phpMyAdmin

PHP is necessary
For this guide, you will need to have PHP installed, if you don't install it, check this guide: PHP

Download

Download phpMyAdmin last version and extract it to html folder in nginx. Rename it phpmyadmin and check in the below example if you have same file hierarchy. Full path: C:\Users\username\scoop\apps\nginx\current\html

📦C:/Users/username/scoop/apps/nginx/current
 ┣ 📂conf
 ┣ 📂conf.original
 ┣ 📂contrib
 ┣ 📂docs
 ┣ 📂html
 ┃ ┣ 📂phpmyadmin
 ┃ ┃ ┣ 📂doc
 ┃ ┃ ┣ 📂...
 ┃ ┣ 📜50x.html
 ┃ ┣ 📜index.html
 ┃ ┗ 📜info.php
 ┣ 📂html.original
 ┣ 📂logs
 ┣ 📂logs.original
 ┣ 📂temp
 ┗ 📜nginx.exe

Configure nginx.conf

PHP Service
Here, I suppose you have installed php-nts with scoop and create php8.2 Service with NSSM.If you want to use another version of PHP, it's not a problem, just check port 9082 to change it if you use anoter.

You will need to add some infos to nginx.conf (you will find it where scoop install NGINX C:\Users\username\scoop\apps\nginx\current\conf\nginx.conf) for phpMyAdmin.

For default server (server_name localhost;) block

  • index.php to location / block
  • location ~ \.php$ block (see example for complete block)

NGINX configuration example

You have update nginx.conf, so you need to restart NGINX Service:

PowerShell
sudo nssm restart nginx

In any browser, at http://localhost/phpmyadmin, you have to see phpMyAdmin welcome page

Configure phpMyAdmin (optional)

cp C:/Users/$env:UserName/scoop/apps/nginx/current/html/phpmyadmin/config.sample.inc.php C:/Users/$env:UserName/scoop/apps/nginx/current/html/phpmyadmin/config.inc.php

In C:/Users/$env:UserName/scoop/apps/nginx/current/html/phpmyadmin

// blowfish_secret is just a token for phpMyAdmin
$cfg['blowfish_secret'] = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';

/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
// Add this line to stay connected during one week
$cfg['LoginCookieValidity'] = 604800;

To generate blowfish_secret, you can use pwgen with WSL.

sudo apt install pwgen ; pwgen -s 32 1

If you update LoginCookieValidity, you need to update session.gc_maxlifetime in current php.ini

// line ~1400
session.gc_maxlifetime = 604800