Fix XAMPP phpMyAdmin Not Opening or Showing Forbidden Error
Facing phpMyAdmin not opening or “Access Forbidden” error in XAMPP? Learn how to fix it step-by-step for Windows, macOS, and Linux/Ubuntu systems.
🧩 Introduction
Trying to open http://localhost/phpmyadmin
but getting a 403 Forbidden or blank page? phpMyAdmin often fails to load due to Apache config restrictions, incorrect aliases, or permission issues on non-Windows platforms.
This post will walk you through exact steps to fix it across Windows, macOS, and Linux.
❗ Common Causes
- Apache denying access via
httpd-xampp.conf
- Missing or wrong phpMyAdmin alias
- Directory permission issues
config.inc.php
misconfiguration- Antivirus or firewall blocking local access
🖥️ Fix on Windows
✅ Step-by-Step:
- Edit Apache config file:
- Open
C:\xampp\apache\conf\extra\httpd-xampp.conf
- Open
- Find this block:
<Directory "C:/xampp/phpMyAdmin"> AllowOverride AuthConfig Require local </Directory>
- Change
Require local
to:Require all granted
This allows access from any browser or device (use carefully if on public network). - Restart Apache via XAMPP control panel.
- Now access:
http://localhost/phpmyadmin
🍏 Fix on macOS
✅ Step-by-Step:
- Open Apache config file:
sudo nano /Applications/XAMPP/xamppfiles/etc/extra/httpd-xampp.conf
- Locate phpMyAdmin Directory block:
<Directory "/Applications/XAMPP/xamppfiles/phpmyadmin"> AllowOverride AuthConfig Require local </Directory>
- Change
Require local
to:Require all granted
- Check Permissions (optional):
sudo chmod -R 755 /Applications/XAMPP/xamppfiles/phpmyadmin
- Restart Apache:
sudo /Applications/XAMPP/xamppfiles/xampp restartapache
- Try accessing:
http://localhost/phpmyadmin
🐧 Fix on Linux/Ubuntu
✅ Step-by-Step:
- Edit the Apache XAMPP file:
sudo nano /opt/lampp/etc/extra/httpd-xampp.conf
- Modify this block:
<Directory "/opt/lampp/phpmyadmin"> AllowOverride AuthConfig Require local </Directory>
Replace with:Require all granted
- Fix folder permissions:
sudo chmod -R 755 /opt/lampp/phpmyadmin
- Restart XAMPP:
sudo /opt/lampp/lampp restart
- Open:
http://localhost/phpmyadmin
⚠️ Bonus: Login Errors or Blank Page?
- Open
config.inc.php
file (insidephpMyAdmin
folder) - Ensure
$cfg['Servers'][$i]['host']
is:$cfg['Servers'][$i]['host'] = 'localhost';
- Check PHP error logs:
C:/xampp/php/logs/php_error_log
📌 Conclusion
phpMyAdmin is an essential tool for MySQL management in XAMPP. Whether it’s a 403 error, blank page, or access denied, it usually comes down to Apache config. This guide helps you solve the issue on any OS.
💬 Still Can’t Access?
Drop your httpd-xampp.conf
block or a screenshot in the comments and I’ll personally walk you through the fix.