Vesta Control Panel (VestaCP) includes phpMyAdmin, a web-based tool for managing MySQL or MariaDB databases. Here is how to access, configure, and troubleshoot phpMyAdmin in VestaCP.
Access phpMyAdmin in VestaCP
1
Login to VestaCP
- Go to your VestaCP login URL:
- Enter your username and password.
http://your-server-ip:8083
2
Open phpMyAdmin
- Navigate to the "DB" (Database) section in VestaCP.
- Click the phpMyAdmin link at the top-right corner.
3
Login to phpMyAdmin
- Use your database username and password to log in.
If you do not remember your credentials:
- Look for them in your VestaCP database management section.
- Or check the database configuration file of your application (e.g., wp-config.php for WordPress).
Default URL for phpMyAdmin
The default phpMyAdmin URL in VestaCP is:
http://your-server-ip/phpmyadmin
If you have changed your server domain or added SSL, it might be:
https://your-domain.com/phpmyadmin
Common Configurations
Changing phpMyAdmin Access URL
- Open the configuration file:
- Modify the location block to change the URL. For example:
- Save the file and restart Nginx:
sudo nano /etc/nginx/conf.d/phpmyadmin.conf
location /custom-phpmyadmin-url {
alias /usr/share/phpMyAdmin;
index index.php;
}
alias /usr/share/phpMyAdmin;
index index.php;
}
sudo systemctl restart nginx
Enable SSL for Secure phpMyAdmin Access
- Install a valid SSL certificate for your server (e.g., via Let's Encrypt in VestaCP).
- Force SSL redirection for phpMyAdmin:
- Edit the Nginx configuration file:
- Add:
sudo nano /etc/nginx/conf.d/phpmyadmin.conf
server {
listen 443 ssl;
server_name your-domain.com;
ssl_certificate /path/to/ssl.crt;
ssl_certificate_key /path/to/ssl.key;
location /phpmyadmin {
alias /usr/share/phpMyAdmin;
index index.php;
}
}
listen 443 ssl;
server_name your-domain.com;
ssl_certificate /path/to/ssl.crt;
ssl_certificate_key /path/to/ssl.key;
location /phpmyadmin {
alias /usr/share/phpMyAdmin;
index index.php;
}
}
- Save and restart Nginx:
sudo systemctl restart nginx
Troubleshooting phpMyAdmin Issues
| Issue | Solution |
|---|---|
| Cannot Access phpMyAdmin - Error 404 |
sudo apt install phpmyadmin
sudo ln -s /usr/share/phpMyAdmin /var/www/html/phpmyadmin
|
| Access Denied | Confirm database credentials in VestaCP or the application config file. |
| phpMyAdmin Not Loading Properly |
php -v
sudo apt install php-mbstring php-zip php-gd php-json php-curl
sudo systemctl restart php7.x-fpm nginx
|
| Too Many Redirects |
|
| phpMyAdmin Fails After Update |
sudo dpkg-reconfigure phpmyadmin
|
Securing phpMyAdmin
- Restrict Access by IP:
- Edit the Nginx config for phpMyAdmin:
location /phpmyadmin {
allow 192.168.1.0/24;
deny all;
} - Password Protect phpMyAdmin:
- Create a password file:
- Update Nginx config:
sudo htpasswd -c /etc/phpmyadmin/.htpasswd adminlocation /phpmyadmin {
auth_basic "Restricted Access";
auth_basic_user_file /etc/phpmyadmin/.htpasswd;
}
- Access phpMyAdmin via VestaCP or directly through http://your-server-ip/phpmyadmin.
- Configure SSL and secure access with IP restrictions or password protection.
- If phpMyAdmin is not working, check installation, PHP extensions, and server configurations.


