I am using ubuntu-11.04.

I followed these steps on this site:

So far my apache2, php, and mysql are working fine except phpmyadmin... Whenever I run this:


I get this error on my browser:

Not Found

The requested URL /phpmyadmin/ was not found on this server.

Apache/2.2.17 (Ubuntu) Server at localhost Port 80

  • Have you restarted the apache server: /etc/init.d/apache2 restart
    – Tom
    Commented Aug 2, 2011 at 8:52
  • Consider, checking answer provide by @sangharsh.
    – Ketan
    Commented Sep 8, 2018 at 7:04
  • sudo apt install lamp-server^ from first link in JohanSJA's answer. This installs any missing modules. Mine were: libapache2-mod-php and libapache2-mod-php8.1
    – ATutorMe
    Commented Jan 24, 2023 at 8:08
  • Does this answer your question? How to solve the phpmyadmin not found issue after upgrading php and apache?
    – Daniel T
    Commented Feb 27 at 20:33

10 Answers 10


Please read this section in Ubuntu wiki. You will need to configure your apache2.conf to make phpMyAdmin works.

gksu gedit /etc/apache2/apache2.conf

Then add the following line to the end of the file.

Include /etc/phpmyadmin/apache.conf

Then restart apache

/etc/init.d/apache2 restart
  • 11
    I love you @JohanSJA Commented Jul 23, 2012 at 8:59
  • 1
    No need of manual configurations, apt-get ing is enough to run phpmyadmin
    – Tachyons
    Commented Feb 13, 2013 at 14:11
  • 1
    I finally got JohanSJA's instructions to work after I restarted the apache server using /etc/init.d/apache2 restart. Also I moved the Include line to the bottom of the file as instructed. Commented Jun 16, 2013 at 16:34
  • 1
    I included apache.conf at the bottom and restarted apache server afterwards, still getting not found, how can I debug it ?
    – Sohail
    Commented Oct 12, 2013 at 13:59
  • This worked for me, just remember to restart apache2 Commented Jun 18, 2014 at 8:39

Tried various different ways.

Finally this, this from ubuntu documentation, worked for me:

sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo a2enconf phpmyadmin
sudo service apache2 reload
  • 1
    Worked on 15.10. Commented Nov 22, 2015 at 11:58
  • also worked on 16.04 Commented Apr 13, 2017 at 5:58
  • 1
    This should be marked as the correct recommended way to achieve this Commented Apr 15, 2017 at 21:25
  • This is the correct way.
    – Ketan
    Commented Sep 8, 2018 at 7:03
  • thanks. finally something that works. this should be the best answer. Commented Jan 22, 2019 at 7:47

Ubuntu 16.04

After installing and setting up user and password in mysql and phpmyadmin execute following command

sudo apt install php-gettext

Worked for me...

Edit1 If you just need apache, phPmyAdmin, and MySql just to a Web Application Environment then I Suggest for exampp wich Install All three for you and then you are Ready to go Here is Link

XAMPP Installers and Downloads | Apache Friends

  • This worked for me too. php-gettext was missing. I wonder, why none of the documentation mention about this module...
    – JTheDev
    Commented Jan 25, 2017 at 6:43

Don't panic ! Just run the following code with root permission in terminal

sudo ln -s /usr/share/phpmyadmin /var/www

I faced same problem, I fixed it by running sudo dpkg-reconfigure phpmyadmin

give new username and password


You need to find where phpmyadmin is located, e.g. locate phpmyadmin, some it will return the location, such as /usr/share/phpmyadmin.

Then you can symlink it like this: sudo ln -s /usr/share/phpmyadmin /var/www

Starting Ubuntu 14.04 and up, /var/www is no longer work instead /var/www/html. e.g, sudo ln -s /usr/share/phpmyadmin /var/www/html

Reference: Where to place my local website starting with the 2.4.7 version of apache2?

  • If you are planning to host wordpress or another website in apache root i.e. /var/www/html then use sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin. That way you can access phpmyadmin using http://yourdomain/phpmyadmin
    – nandan
    Commented Feb 27, 2019 at 12:41

finally this work for ubuntu 14.04 LTS

sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin
sudo service apache2 restart

now type localhost/phpmyadmin in web browser.

sudo sed -i '$ a\Include /etc/phpmyadmin/apache.conf' /etc/apache2/apache2.conf && sudo service apache2 restart && sudo apt-get install php-gettext`

Tested and works. Running that should solve it for anyone who wants a 1 liner.


I tried all the above methods and they didn't work for me. Finally this one worked.

Open terminal and switch to super user using the command: sudo su

After installing phpmyadmin using instructions given in the link, open /etc/apache2/conf-available.

You will find a file there named phpmyadmin.conf. Copy it to /etc/apache2/conf-enabled. Or simply use the command

sudo cp /etc/apache2/conf-available /etc/apache2/conf-enabled

Restart apache2 (sudo service apache2 restart) and then open the link localhost/phpmyadmin in a browser.


I was facing the same problem.

Firstly check if the directory called /usr/share/phpmyadmin/ exists. If it does, just move it to /var/www/phpmyadmin by executing this command:

mv /usr/share/phpmyadmin /var/www/phpmyadmin

Open your browser and open http://localhost/phpmyadmin. Now it should work.

  • 6
    This will break the uninstaller, and will cause installation/upgrade issues. You will need to symlink the directory. sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadmin should correctly symlink.
    – Thomas Ward
    Commented Jul 26, 2012 at 15:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .