How To Install phpMyAdmin on Ubuntu 22.04 with Apache | vetechno
Rate this post

Last Updated on September 24, 2022 by Vikash Ekka

In this tutorial I help you how to install and configure phpMyAdmin on Ubuntu 22.04 LTS Jammy Jellyfish Linux System. The phpMyAdmin package is also available for Ubuntu 20.04 and 18.04 on the official page .

If you need to install the latest version of phpMyAdmin on Ubuntu, then you have to download the .zip package from the official phpMyAdmin releases page and follow the same below steps to install the phpMyadmin on Ubuntu System.

What is PhpMyadmin ?

phpMyAdmin is a free and open-source web platform Graphical User Interface (GUI) tool used to manage MySQL and MariaDB databases. phpMyAdmin can be host on any server running with Apache and PHP.

I will show you the step-by-step installation process of the phpMyAdmin on Ubuntu 22.04 (Jammy Jellyfish). You can follow the same instructions for Ubuntu 20.04, 18.04 and any other Debian-based distribution like Linux Mint, Elementary OS, Pop!_OS, and more as well.

Before you begin, you’ll need to install the LAMP (Linux, Apache, MySQL, PHP) stack on your desktop or server. Also, the MySQL database should be up and running.


  1. You must have sudo / root privileges to access Ubuntu Operating System
  2. Internet connection
  3. Operating System :- Ubuntu 22.04, 20.04, 18.04 LTS.

These commands can be also executed on Ubuntu 20.04 and 18.04 LTS.

Step 1. First Update and Install system packages:

To install any package on Ubuntu operating system need to update the repository’s package list by using the following command:

sudo apt update
sudo apt install software-properties-common

Step 2. Add PHP PPA Repository

Ondřej Surý, a Debian developer, maintains a repository that contains all PHP versions for the Ubuntu systems. To enable the repository , run the below command:

sudo add-apt-repository ppa:ondrej/php

Step 3. Update the system packages.

sudo apt update

Once the PPA is enabled, you can install any PHP version.

Step 4. Install PHP 8.1 on Ubuntu 22.04 LTS.

Before we move forward please make sure you have installed the PHP dependency packages. Here I’m installing PHP 8.1 for this tutorial.

sudo apt install php8.1

Step 5. Install PHP 8.1 modules or extensions.

Below I have mentioned all PHP 8.1 module that are generally needed for executing PHP code on the web server.

apt-get install php8.1-common php8.1-mysql php8.1-xml php8.1-curl php8.1-gd php8.1-imagick php8.1-cli php8.1-dev php8.1-imap php8.1-mbstring php8.1-opcache php8.1-soap php8.1-zip php8.1-tidy php8.1-yaml php8.1-bcmath -y

Check PHP version and modules by following below command. php -m will list all PHP modules and extensions.

php -v
php -m

Step 6. Install Apache on Ubuntu 20.04 LTS

sudo apt install apache2

Once the installation finished, enable and start Apache2 web server.

sudo systemctl enable apache2
sudo systemctl start apache2

Step 7. Install MySql Database Server on Ubuntu 22.04 LTS

PhpMyAdmin connects MySQL database to login so we need to install MySQL on Ubuntu System. It will install the latest mysql server, For specific version (MySQL 8.0, MySQL 5.7) follow this link.

sudo apt install mysql-server

Step 8. Download and Install phpMyAdmin on Ubuntu 22.04 LTS

Download latest version of phpMyAdmin with wget command. You can check the release of phpMyAdmin from the downloads page.


Now extract downloaded Archive with unzip command below

sudo apt install unzip

Rename the directory to phpmyadmin

mv phpMyAdmin-5.2.0-all-languages phpmyadmin

Now move phpmyadmin folder under the /var/www/html/.

mv phpmyadmin /var/www/html/

Create phpMyAdmin file.

sudo cp /var/www/html/phpmyadmin/  /var/www/html/phpmyadmin/

Create tmp directory in phpmyadmin folder.

sudo mkdir -p /var/www/html/phpmyadmin/tmp
sudo chmod 777 /var/www/html/phpmyadmin/tmp

After making all the changes, make sure to start the Apache service to reload all settings.

sudo systemctl restart apache2 

Step 8 – Access phpMyAdmin web interface on Ubuntu 22.04 LTS

Enter the server IP address or domain name in the browser URL address to access phpMyAdmin web interface.

For Example:-



Install phpMyAdmin on Ubuntu 22.04 LTS


Congratulation you have successfully installed the phpMyAdmin on the Ubuntu System. Please let me know in the below comment box, if you are facing any issue while installing. I will happy to assist you …

Happy Learning !!!!!!!!!!!

By Vikash Ekka

Hi All, My name is Vikash Ekka from India. I’m the founder and tech editor of I have completed my Graduation in BCA. I love to write technical articles like Windows, Linux & MAC Tutorials, Tips, Tricks, How To fix, Tutorials About Ethical Hacking & Cyber Security Guide, and Software Review. Currently, I have been working as an IT professional since 2018.

Leave a Reply

Your email address will not be published. Required fields are marked *