This guide covers installing phpMyAdmin using Ploi's 1-click installer and manual installation on Ubuntu servers.
Installation via Ploi (Recommended)
Prerequisites
A server provisioned through Ploi
MySQL or MariaDB installed on the server (phpMyAdmin is not available for PostgreSQL)
An existing site where you want to install phpMyAdmin
Step-by-Step installation
Navigate to your site
Go to your server in the Ploi dashboard
Select the site where you want to install phpMyAdmin
Select phpMyAdmin
Find phpMyAdmin in the installers list
Click on the phpMyAdmin card
Install
Click the "Install phpMyAdmin" button
The installation status will show "phpMyAdmin is currently installing, please hold on"
Wait for the installation to complete (typically 1-2 minutes)
Access phpMyAdmin
Once installed, a phpMyAdmin panel will appear showing your domain
Click "Open phpMyAdmin" to access the interface
Log in using your database credentials

Adding SSL (Recommended)
After installation, you can secure phpMyAdmin with SSL:
Navigate to your server's Services section
Find phpMyAdmin in the services list
Click "Install SSL"
Ploi will automatically provision a Let's Encrypt certificate
Uninstalling
To remove phpMyAdmin:
Navigate to your site in Ploi
Find the phpMyAdmin section
Click the "Uninstall" button
Confirm the uninstallation
Manual installation on Ubuntu
This section covers manual installation on Ubuntu servers with Nginx and PHP already configured.
Prerequisites
Ubuntu 20.04/22.04/24.04
Nginx installed and running
PHP 8.x with FPM installed
MySQL or MariaDB installed
Root or sudo access
Step 1: Install required PHP extensions
sudo apt update
sudo apt install -y php-mbstring php-zip php-gd php-json php-curl
Step 2: Download phpMyAdmin
cd /tmp
wget https://files.phpmyadmin.net/phpMyAdmin/5.2.1/phpMyAdmin-5.2.1-all-languages.tar.gz
sudo mkdir -p /usr/share/phpmyadmin
sudo tar -xzf phpMyAdmin-5.2.1-all-languages.tar.gz -C /usr/share/phpmyadmin --strip-components=1
Step 3: Configure phpMyAdmin
# Create temp directory for sessions
sudo mkdir -p /usr/share/phpmyadmin/tmp
sudo chmod 777 /usr/share/phpmyadmin/tmp
# Create configuration file
sudo cp /usr/share/phpmyadmin/config.sample.inc.php /usr/share/phpmyadmin/config.inc.php
# Generate a random blowfish secret (32 characters)
BLOWFISH_SECRET=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | head -c 32)
# Update the configuration
sudo sed -i "s/\$cfg\['blowfish_secret'\] = '';/\$cfg['blowfish_secret'] = '$BLOWFISH_SECRET';/" /usr/share/phpmyadmin/config.inc.php
sudo sed -i "s/\$cfg\['Servers'\]\[\$i\]\['host'\] = 'localhost';/\$cfg['Servers'][\$i]['host'] = '127.0.0.1';/" /usr/share/phpmyadmin/config.inc.php
Step 4: Create symlink
sudo ln -sf /usr/share/phpmyadmin /var/www/html/phpmyadmin
Step 5: Configure nginx
Create a new Nginx configuration file:
sudo nano /etc/nginx/sites-available/phpmyadmin
Add the following configuration (replace your-domain.com with your actual domain and adjust PHP version as needed):
server {
listen 80;
listen [::]:80;
server_name your-domain.com;
root /var/www/html;
index index.php index.html;
location /phpmyadmin {
alias /usr/share/phpmyadmin;
index index.php;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
}
location ~ /\.ht {
deny all;
}
}
Enable the site and reload Nginx:
sudo ln -sf /etc/nginx/sites-available/phpmyadmin /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
Step 6: Set permissions
sudo chown -R www-data:www-data /usr/share/phpmyadmin
Step 7: Access phpMyAdmin
Open your browser and navigate to:
http://your-domain.com/phpmyadmin
Log in using your MySQL/MariaDB credentials.
Optional: Add SSL with Certbot
# Install Certbot if not already installed
sudo apt install -y certbot python3-certbot-nginx
# Obtain SSL certificate
sudo certbot --nginx -d your-domain.com --non-interactive --agree-tos -m [email protected]
Security considerations
phpMyAdmin exposes your database management interface to the web. Consider these security measures:
Recommended alternatives
For better security, consider using desktop database clients that connect via SSH tunnel:
TablePlus (macOS, Windows, Linux)
Sequel Pro / Sequel Ace (macOS)
DBeaver (Cross-platform)
MySQL Workbench (Cross-platform)
If you must use phpMyAdmin
Always use HTTPS - Install an SSL certificate
Restrict access by IP - Add IP restrictions in Nginx:
location /phpmyadmin { allow 123.456.789.0; # Your IP deny all; # ... rest of config }Use strong database passwords - Ensure all database users have strong, unique passwords
Keep phpMyAdmin updated - Regularly update to the latest version
Consider HTTP Basic Auth - Add an additional authentication layer:
sudo apt install apache2-utils sudo htpasswd -c /etc/nginx/.htpasswd adminThen add to Nginx config:
auth_basic "Restricted Access"; auth_basic_user_file /etc/nginx/.htpasswd;