WP Stack phpMyAdmin access
phpMyAdmin in Sprey WP Stack is an optional maintenance tool. It is disabled by default and is never exposed directly to the public Internet.
The service publishes only to the VPS loopback interface:
127.0.0.1:8081 -> phpMyAdmin:80Do not open TCP 8081 in UFW or in the VPS provider firewall. Remote access is intended to go through SSH port forwarding.
Start phpMyAdmin
Section titled “Start phpMyAdmin”On the WP Stack VPS:
cd /root/sprey-wp-stackdocker compose --profile admin up -d phpmyadminVerify that the service is running and remains localhost-only:
docker compose --profile admin psdocker port sprey-wp-stack-phpmyadmin-1curl -I --max-time 5 http://127.0.0.1:8081/Expected port mapping:
80/tcp -> 127.0.0.1:8081A successful local HTTP check should return an HTTP response such as 200 OK.
Open the SSH tunnel
Section titled “Open the SSH tunnel”On your own computer, open a separate terminal and keep it running while you use phpMyAdmin:
ssh -L 8081:127.0.0.1:8081 root@YOUR_SERVERThen open:
http://localhost:8081The phpMyAdmin page should load through the SSH tunnel. No public port change is required.
Database credentials
Section titled “Database credentials”The installer generates database credentials in /root/sprey-wp-stack/.env.
For full MariaDB administration through phpMyAdmin, use:
Username: rootPassword: MYSQL_ROOT_PASSWORDRetrieve only the root password value with:
grep '^MYSQL_ROOT_PASSWORD=' /root/sprey-wp-stack/.envCopy the value after = into the phpMyAdmin password field.
For routine access limited to the WordPress database, the application account can be used instead:
Username: value of MYSQL_USERPassword: value of MYSQL_PASSWORDRetrieve those values with:
grep -E '^(MYSQL_USER|MYSQL_PASSWORD)=' /root/sprey-wp-stack/.envTreat .env as a secret. Do not paste its full contents into tickets, public chats, screenshots, repositories, or documentation.
Verified behavior
Section titled “Verified behavior”The current WP Stack deployment has verified the following path end to end:
- phpMyAdmin started from the
adminCompose profile; - the service published only on
127.0.0.1:8081; - the VPS-local HTTP check returned
200 OK; - the UI opened successfully through an SSH tunnel at
http://localhost:8081; - login as MariaDB
rootwithMYSQL_ROOT_PASSWORDsucceeded; - the
wordpressdatabase and MariaDB system schemas were visible after login; - stopping phpMyAdmin removed the localhost listener and
127.0.0.1:8081became unreachable; - starting the same service again restored
127.0.0.1:8081and the local HTTP check returned200 OKagain; - on the verified Ubuntu 26.04.1 ARM64 manual deployment,
phpmyadmin:latestpulled aslinux/arm64, started successfully from the sameadminprofile, remained bound to127.0.0.1:8081, returned local HTTP200, and left MariaDB healthy; - with phpMyAdmin left running, a normal host reboot was performed; after reboot phpMyAdmin returned automatically, remained bound only to
127.0.0.1:8081, and again returned local HTTP200while Caddy, WordPress, and healthy MariaDB also recovered; - removing the stopped phpMyAdmin container and
phpmyadmin:latestimage on the verified 10 GB test VPS reduced root-filesystem usage from 78% to 71%, increased free space from about 2.2 GB to about 2.8 GB, and reduced Docker image accounting from about 2.484 GB across four images to about 1.78 GB across the three core images.
The Compose service uses both edge and app networks so Docker can publish the localhost maintenance port while phpMyAdmin can still reach MariaDB on the private app network. MariaDB itself remains on app only.
Stop and restart phpMyAdmin
Section titled “Stop and restart phpMyAdmin”When maintenance is finished:
cd /root/sprey-wp-stackdocker compose --profile admin stop phpmyadminConfirm that the local port is no longer reachable:
curl -I --max-time 5 http://127.0.0.1:8081/To start the already-created maintenance container again:
docker compose --profile admin start phpmyadminThen verify:
docker compose --profile admin pscurl -I --max-time 5 http://127.0.0.1:8081/The stop/start lifecycle and active-service reboot behavior are verified.
Small-disk cleanup
Section titled “Small-disk cleanup”On small VPS disks, phpMyAdmin is best treated as a temporary maintenance tool rather than a permanently retained image.
On the verified 10 GB test host, pulling and starting phpMyAdmin brought root-filesystem usage to 78% with about 2.2 GB free. At that point Docker reported about 2.484 GB of images across four images. The system journal used about 8 MB, /var/log about 9.6 MB, and the active container log files were only a few hundred kilobytes in total, confirming that log rotation was not the meaningful storage issue.
After maintenance, stop and remove the phpMyAdmin container and, when disk headroom matters, remove its image as well:
cd /root/sprey-wp-stackdocker compose --profile admin stop phpmyadmindocker compose --profile admin rm -f phpmyadmindocker image rm phpmyadmin:latestThen check the result:
docker system dfdf -h /On the verified host, that cleanup returned the root filesystem to 71% usage with about 2.8 GB free. Docker image accounting dropped to about 1.78 GB across the three core images. This behavior is therefore VERIFIED for the current test deployment.
This does not remove the WordPress or MariaDB containers, volumes, or site data. The next time phpMyAdmin is needed, recreate it with:
docker compose --profile admin up -d phpmyadminDocker will pull the image again if it is no longer present locally.
The exact amount of space reclaimed can vary with image versions and shared layers, so measure each host rather than assuming the same number everywhere.
Security notes
Section titled “Security notes”- Keep TCP
8081closed publicly. - Use SSH tunneling rather than publishing phpMyAdmin on
0.0.0.0. - Start phpMyAdmin only when needed and stop it after maintenance.
- On small VPS disks, consider removing the stopped phpMyAdmin container and image after maintenance.
- Prefer the WordPress database user for routine inspection when full MariaDB root privileges are unnecessary.
- Protect
.env; it contains database credentials generated for the deployment.