Unable to Locate Package phpmyadmin on Ubuntu VPS? Fix It in Minutes
Why the "Unable to locate package phpmyadmin" Error Occurs
If you've recently launched a fresh Ubuntu VPS and tried running:
sudo apt install phpmyadmin
...you might see:
E: Unable to locate package phpmyadmin
This happens because:
- The phpmyadmin package isn't in the default Ubuntu 20.04/22.04 repositories
- Some VPS providers ship minimal OS images with limited software sources
- The universe repository (where phpmyadmin resides) isn't enabled
Prerequisites Before Installing phpMyAdmin
Make sure:
- You're using a Ubuntu 20.04 or 22.04 VPS
- You have sudo/root access
- Your VPS is connected to the internet
If you don't have a VPS yet, check out our Ubuntu VPS Hosting Plans (Ryzen VPS page link) with root access and managed support for LAMP/LEMP setup.
Step-by-Step Fix for Ubuntu VPS
Step 1: Update Package Lists
sudo apt update && sudo apt upgrade -y
Step 2: Enable the Universe Repository
sudo add-apt-repository universe sudo apt update
Step 3: Install phpMyAdmin
sudo apt install phpmyadmin -y
During installation:
- Select the web server (Apache or Lighttpd)
- Configure the database with dbconfig-common
- Set a password for phpmyadmin user
Step 4: Enable PHP Extension and Restart Apache (if needed)
sudo phpenmod mysqli sudo systemctl restart apache2
Step 5: Access phpMyAdmin
Open your browser and visit:
http://your-server-ip/phpmyadmin
Need a secure domain with SSL? Register a secure Domain. (Domain page link)
Common Mistakes to Avo
- Missing universe repo → Use add-apt-repository universe
- Wrong Ubuntu version → Some older versions dropped support
- Incomplete LAMP setup→ Make sure Apache, PHP, and MySQL are installe
Alternatives to phpMyAdmin
If phpMyAdmin feels heavy or complex, here are some alternatives:
| Tool | Description |
|---|---|
| Adminer | Lightweight PHP-based DB admin |
| MySQL CLI | Default command-line client |
| HeidiSQL | GUI-based, works via SSH tunnel |
Need help choosing the right stack? Explore our Managed VPS Services (Xeon VPS page) for assistance.
Final Thoughts and Related Resources
Getting the "Unable to locate package phpmyadmin" error is common on new VPS setups, but it's easily fixable by enabling the correct APT repositories. With a properly configured LAMP stack, phpMyAdmin gives you powerful, browser-based database control.
Conclusion
The “Unable to locate package phpmyadmin” error can be frustrating, especially when setting up a fresh Ubuntu VPS. But in most cases, it simply comes down to missing repositories or outdated package lists. By enabling the universe repository and properly configuring your system, you’ll have phpMyAdmin installed and running in just a few minutes.
Whether you're managing databases, deploying a website, or configuring a full web stack, having a stable and well-supported VPS environment makes all the difference.
Frequently Asked Questions (FAQ)
Why am I getting 'Unable to locate package phpmyadmin' on Ubuntu?
This error occurs because the phpmyadmin package is not available in the default Ubuntu 20.04 or 22.04 repositories. You need to enable the universe repository and update your APT sources to install it.
How do I fix the 'Unable to locate package phpmyadmin' error on my VPS?
sudo add-apt-repository universe
sudo apt update
sudo apt install phpmyadmin
This will enable the required repository and install phpMyAdmin on your Ubuntu VPS.
Is phpMyAdmin available on Ubuntu 22.04?
Yes, phpMyAdmin is available on Ubuntu 22.04, but it is not included in the default package sources. You must manually enable the universe repository using:
sudo add-apt-repository universe
Then update your package list with sudo apt update.
Can I install phpMyAdmin on a VPS with a LAMP stack?
What are some alternatives to phpMyAdmin for database management?
Some popular alternatives include:
- Adminer – a lightweight PHP-based database management tool.
- MySQL CLI – command-line client for advanced users.
- MySQL Workbench – a GUI-based tool (run locally and connect via SSH).
These tools can also be used effectively on a VPS
If you are still having any issues or confusion, please feel free to contact us via Live Chat on our website. Our support team is always ready to help you.
