phpmyadmin 404 solution

So, you tried to access phpmyadmin and got ‘phpMyAdmin Error 404 Page Not Found’ or ‘page not found’?

phpmyadmin 404 solution

This is real nasty thing and irritates nearly everyone. To have it working properly is must for every webmaster. So, let’s see what you can do.

This error appears when you try to access phpMyAdmin control panel / dashboard using domain or IP address in this way;

mydomain.com/phpmyadmin

OR

127.0.0.1/phpmyadmin

This problem is mostly caused due to improper directives or misconfiguration in Apache. It doesn’t happen with every server and apache config. Just some are prone to it.

Method 1: Configuring Directives

1. Connect to your server using SSH (Putty etc).
2. Now, copy-paste this command;

sudo nano /etc/httpd/conf/httpd.conf

3. This file contains all the directives needed for a server to redirect, process or identify different name based servers etc.

4. Go to end of this configuration file. Most probably you will find configuration of your server. If not then find your virtual server host configuration and copy-paste the following;

Alias /phpmyadmin '/var/www/html/phpmyadmin/'

<Directory /var/www/html/phpmyadmin>
Options FollowSymLinks
DirectoryIndex index.php

<IfModule mod_php5.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_value include_path .
</IfModule>
</Directory>

5. Now restart the httpd (apache) by using command;

sudo service httpd restart

6. Try to access phpMyAdmin control panel using domain or IP in this fashion;

domain.com/phpmyadmin

7. You must see the phpMyAdmin Login page.

8. Done!

If this doesn’t work out for you then you must reconsider the path of Apache config file. Different OS have different locations and also different commands to restart the services.

One more but old method was to symlink the httpd configuration. This may work on older servers, Ubuntu OS and other apache versions.

Method 2: Symlinking

1. Connect to VPS, server etc and type this;

 sudo dpkg-reconfigure -plow phpmyadmin

2. You will have option to select Apache webserver to configure. Select it as per your domain.

3.  If above fails then you can directly copy-paste the following;

sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
sudo /etc/init.d/apache2 reload

This will symlink the config files.

4. Now try to access the phpMyAdmin. You shall not get 404 Error Page Not Found.

Done! Comments and issues are welcome as always.

If this or other problem persist. You may want to review your installation of phpMyAdmin, MySQL, Apache or PHP here.

For other errors and troubleshooting of phpMyAdmin, read this article.

Enjoy!

By Mrinal Buddekar

Data Manager and a technology enthusiast! Mrinal Buddekar is Pune based blogger who loves building server, websites, technology, and affiliate blogging.

Hey there!

Help us reach out to awesome people lie you out there. We publish Tech and WordPress, Deals, and Reviews. WE DON'T SPAM!

Your Information will never be shared with any third party