How to solve the phpmyadmin not found issue after upgrading php and apache?
Create a link in /var/www
like this:
sudo ln -s /usr/share/phpmyadmin /var/www/
Note: since 14.04 you may want to use /var/www/html/
instead of /var/www/
If that's not working for you, you need to include PHPMyAdmin inside apache configuration.
Open apache.conf
using your favorite editor, mine is vim
:)
sudo vim /etc/apache2/apache2.conf
Then add the following line:
Include /etc/phpmyadmin/apache.conf
For Ubuntu 15.04 and 16.04
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo a2enconf phpmyadmin.conf
sudo service apache2 reload
Usually this is an issue after a vanilla install in 16.04, 18.04 and 20.04 (Focal Fossa) and higher too.
To fix it:
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo a2enconf phpmyadmin.conf
sudo systemctl restart apache2
Most probably your apache doesn't load the configuration of the phpmyadmin part.
The link you made from /etc/phpmyadmin/apache.conf
to /etc/apache2/conf.d/phpmyadmin.conf
may not be valid anymore after the update. Make this link again, but notice the names may be different. After that, restart apache.