PhpMyAdmin LocalHost Forbidden with WampServer And Windows 8

First of all, I can say, that it isn’t my new post, because I have actually posted almost similar tutorial last year about fixing this localhost forbidden problem with wampserver, click here if you want to know how I install wordpress offline using Windows 7 and wampserver.

The method in Windows 8 will be exactly the same.

The reason I renew that post is because, I actually realize to change “deny from all” to “allow from all” is risking your system since you will allow every access from every IP address to your computer.

In this tutorial, I am using Windows 8 Pro and wampserver the latest version when I write this.

Basically, when I wanted to install wordpress locally with wampserver, I can’t access localhost or PHPMyAdmin.

This is the error message, saying:

You don’t have permission to access / on this server.


Image as I wanted to access localhost:

403 forbidden localhost

403 forbidden localhost

Image as I wanted to access PHPMyAdmin

403 forbidden phpmyadmin

403 Forbidden phpmyadmin

Like I said in my video, you could of used the most easiest method, which simply typing in your web browser to access localhost or phpmyadmin, and you will be able to do that easily.

So typing will work.

If this method is satisfying you, you can stop reading right here :-) But if you wanted to fix it, and use “localhost” or sooo curious like me, you can read further.

I have tried many tips and tricks that I googled and found in wampserver, I managed to get it working, but I got another trouble, which was getting the WAMP server stays on orange color and not green, which means, it wasn’t active.

Then tried another method, and finally, after many methods, this has worked fine for me.

Things To Check If You Have PHPMyAdmin and LocalHost Forbidden Problem

1. First of all, you should check in “Programs and features” in your Control Panel, whether you have “Microsoft Visual C++ 2008 and 2010 Redistributable” installed in your PC.

Microsoft Visual C++ 2008 and 2010 Redistributable

Microsoft Visual C++ 2008 and 2010 Redistributable

2. Next is finding what Operating System type you have, is it 32-bit OS or 64-bit OS? After you know it, then you can download wampsever for your OS type in this page. You will notice you will have 32-bit or 64-bit OS options there, choose it accordingly.

32 bit or 64 bit

32-bit or 64-bit?

3. Checking your host file.  WARNING: Backup your hosts file somewhere save.

To check your hosts file, you need to open your default text editor (in my case is notepad) as administrator of your computer. Then browse your Local Disc where you installed windows, which mine called, “F” because I dual boot my system. If you don’t dual boot your PC, then it should be on C Local Disk.

Browse the hosts file in, C:\Windows\System32\Drivers\etc

Inside “etc” folder, usually you will see empty folder, choose “All Files” in the drop down menu button to see hosts file.

hosts file windows 8

hosts file inside “etc” is unseen until you select, “All Files”

Then, after choosing “All Files”, select “hosts” file, and click “Open” button.

It will open your default text editor, notepad.

Inside the notepad, after hosts file BACKUP, you should see only, locahost line only.

If you have checked these 3 things above, and all is good, then you can start to do these following steps.

Steps How I fix this

1. Click the “W” green wampserver icon on the bottom left of your screen, scroll up, and select, “Apache” then in the right menu, click “httpd.conf” to open it.

httpd conf wampserver

httpd conf wampserver

2. In notepad, search for “127”, and you will find it, it is this line of code:

# onlineoffline tag - don't remove
Order Deny,Allow
Deny from All
Allow from

Add space, colon, colon, one. ::1

See the pic, the red highlighted one is the characters I added.

allow from line

The red highlighted characters are just added.

Click, Save.

3. Click the wampserver icon, and select, “Restart All Services” to restart wampserver.

restart all services

restart all services

4. If you want, you can check by accessing http://localhost in your web browser, and you will be able to access it, but you can’t access PHPMyAdmin, because we have to do this:

Go to the directory where you install wamp, should be in C, but mine in F, because I dualboot, so C:\wamp\alias

Inside “alias” folder, open “phpmyadmin” conf file to open it.

Same like in step 2, look for “127” or just scroll down almost at the bottom of the file, the line that says, “Allow from″ add the ” ::1” don’t forget the “space” key before the first colon.

See this added highlighted line:

phpmyadmin conf file

phpmyadmin conf added line

Save, and restart wampserver again like in step 3.

Restart your WAMP server, and go to your localhost on your browser, the PhpMyAdmin and LocalHost Forbidden on WAMP problems should be gone by now.

Share the knowledge
Share on Google+0Tweet about this on TwitterShare on Facebook7Pin on Pinterest0Share on Reddit0Email this to someonePrint this page