How to install PhpMyAdmin on Ubuntu Server

PhpMyAdmin is a web-based, open-source administration tool used for managing and installing web technologies on web servers, and is commonly used by popular web hosting services.

The PhpMyAdmin application is an excellent addition to any Ubuntu Linux web server, as it makes taking care of tasks like database management, app installation and other tasks very easy.

In this guide, we’ll show you how to install PhpMyAdmin on a Linux server running Ubuntu 18.04 LTS. However, these installation instructions should also work with 19.04, 19.10, and other versions of the operating system.

Upgrade Ubuntu 16.04 LTS/14.04 LTS

The PhpMyAdmin software supports older versions of Ubuntu. Still, it should be noted that these older versions will likely not have the newest features like 18.04 LTS or other modern versions of the operating system. So, If you’ve never installed PhpMyAdmin on Ubuntu Server but are looking to do it, you must upgrade beforehand.

Note: please be sure to back up all important data and configuration files for your operating system before attempting to upgrade. It is best to be prepared in case an accident happens during the upgrading process.

Upgrading from 16.04 LTS or 14.04 LTS to Ubuntu 18.04 LTS is an involved process. If you’re familiar with the process of upgrading, log into your server via the command line, and run the do-release-upgrade command.

If you’re not familiar with how to upgrade Ubuntu Server, don’t worry! We have an in-depth guide all about how you can take your current version and upgrade it with ease.

Install a web server

PhpMyAdmin is web technology. To run this web technology on your Ubuntu Server operating system, you must have a web server already configured and ready to go.

If you’re looking into PhpMyAdmin, you may already have a web server set up on Ubuntu. However, not everyone does, so in this section of the guide, we’ll show you how to set up a web server on Ubuntu quickly.

The web server we’ll be focusing on in this guide is Apache. The reason? On Ubuntu, setting up the Apache web server is incredibly simple, which means that even new Linux users won’t have issues getting it working.

To start the installation of Apache on Ubuntu server, enter the command below in your Ubuntu Server’s terminal.

how to install phpmyadmin on ubuntu server How to install PhpMyAdmin on Ubuntu Server

sudo apt install lamp-server^

Let the above command run, and it will install everything from the Apache webserver to MySQL to PHP. When the command finally finishes installing everything, you can confirm that your Apache web server is running with the systemctl command.

systemctl status apache2

If the webserver is running successfully, you will see green text that says “active (running).” If you do not see this message, restart the server and re-run the status command.

PhpMyAdmin on Ubuntu Server 18.04 LTS

Installing PhpMyAdmin on Ubuntu Server isn’t an involved process thanks to the hard work of the operating system developers. Everything is available and ready to install right through traditional Ubuntu software repositories. To start the installation process, follow the step-by-step instructions below.

Step 1: Before installing PhpMyAdmin on Ubuntu Server 18.04 LTS, you should run an update to refresh the software sources, and to see if any pending software updates are ready to install.

Using the update command, check for updates.

sudo apt update

Then, install any pending software patches on your Ubuntu Server with the upgrade command. Be sure to use the “y” command-line switch, as it will allow the command to auto-install everything.

sudo apt upgrade -y

Step 2: Following the update/upgrade process for Ubuntu 18.04 LTS, you will be able to install PhpMyAdmin, as well as the other package dependencies that are required to run the software (php-mbstring and php-gettext).

Using the apt install command, get the latest PhpMyAdmin package installed on your Ubuntu server. Once again, be sure to use the “y” command-line switch to auto-install everything.

sudo apt install phpmyadmin php-mbstring php-gettext

Step 3: Upon installing the PhpMyAdmin packages on your Ubuntu server, you will see a pop-up window. This pop-up window states, “Please choose the web server that should be automatically configured to run phpMyAdmin.”

Select “apache2” in the list, as that is the web server that was installed earlier. Then, highlight the “OK” option and press Enter to continue.

how to install phpmyadmin on ubuntu server 1 How to install PhpMyAdmin on Ubuntu Server

Step 4: After selecting a web server, PhpMyAdmin will show you another prompt. This prompt says, “The phpmyadmin package must have a database installed and configured before it can be used. This can be optionally handled with dbconfig-common.”

If you are proficient in databases on Ubuntu Server, feel free to select the “No” option and configure it later. Otherwise, choose the “Yes” option to have the installer do it automatically.

how to install phpmyadmin on ubuntu server 2 How to install PhpMyAdmin on Ubuntu Server

Step 5: After telling PhpMyAdmin to create the database, you must provide an application password. In the prompt, write in a secure, memorable password.

how to install phpmyadmin on ubuntu server 3 How to install PhpMyAdmin on Ubuntu Server

Upon adding a password to the database, the PhpMyAdmin installer will finish up the installation. When it’s done, you will be able to access the PhpMyAdmin application by pointing your favorite web browser to the URL below.

how to install phpmyadmin on ubuntu server 4 How to install PhpMyAdmin on Ubuntu Server


Leave a Reply

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

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.