phpMyAdmin is a free, web-based tool for managing MySQL and MariaDB databases. It offers a user-friendly interface that allows you to create, edit, manage, and delete databases without manually typing SQL commands.
You can install phpMyAdmin directly via One-Click Apps in the dashboard of your dedicated server. After the initial setup of the apps, open the app catalog, search for phpMyAdmin, and start the installation with your preferred project, environment, and domain settings. This gives you a quick and easy way to deploy and manage phpMyAdmin—without manual command-line installation but with integrated web management, support for custom domains, and SSL where available.
Before starting the installation, make sure your system is up to date. You can perform pending updates and upgrades with:
sudo apt update -y
sudo apt upgrade -y
Also, ensure that PHP is already installed on your system. PHP is essential for using phpMyAdmin. You can find instructions on how to install PHP in our Install PHP guide.
Missing PHP Packages If the necessary PHP packages are missing, phpMyAdmin’s PHP files cannot be processed and displayed correctly.
Once preparation is complete, you can start installing the phpMyAdmin interface. First, open the directory where phpMyAdmin should be installed.
Change to the directory with the command cd /usr/share. Then download the latest phpMyAdmin version into the installation directory using wget:
wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.zip -O phpmyadmin.zip
If the wget command is not found, you can install it with sudo apt install wget -y.
After the download is complete, unzip the file with:
unzip phpmyadmin.zip
If the unzip command is not found, install it with sudo apt install unzip -y.
Now rename the extracted archive to a simpler name, delete the ZIP file, and set the necessary permissions:
mv phpMyAdmin-*-all-languages phpmyadmin
rm phpmyadmin.zip; chmod -R 0755 phpmyadmin
Now phpMyAdmin must be integrated into the web server configuration. Create a new configuration file with nano /etc/apache2/conf-available/phpmyadmin.conf and fill it with the following content:
# phpMyAdmin Apache Configuration
Alias /phpmyadmin /usr/share/phpmyadmin
Options SymLinksIfOwnerMatch
DirectoryIndex index.php
# For security reasons, deny web access to unnecessary directories
Require all denied
Require all denied
Require all denied
Save the file with CTRL+X, confirm with Y, and press Enter.
Activate and load the new virtual host configuration by running:
a2enconf phpmyadmin
systemctl reload apache2
For phpMyAdmin to function properly, a temporary directory must be created and the correct permissions set. Do this with:
mkdir /usr/share/phpmyadmin/tmp/
chown -R www-data:www-data /usr/share/phpmyadmin/tmp/