Fix XAMPP phpMyAdmin Not Opening or Showing Forbidden Error (Windows, macOS, Linux)

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:

  1. Edit Apache config file:
    • Open C:\xampp\apache\conf\extra\httpd-xampp.conf
  2. Find this block: <Directory "C:/xampp/phpMyAdmin"> AllowOverride AuthConfig Require local </Directory>
  3. Change Require local to: Require all granted This allows access from any browser or device (use carefully if on public network).
  4. Restart Apache via XAMPP control panel.
  5. Now access: http://localhost/phpmyadmin

🍏 Fix on macOS

✅ Step-by-Step:

  1. Open Apache config file: sudo nano /Applications/XAMPP/xamppfiles/etc/extra/httpd-xampp.conf
  2. Locate phpMyAdmin Directory block: <Directory "/Applications/XAMPP/xamppfiles/phpmyadmin"> AllowOverride AuthConfig Require local </Directory>
  3. Change Require local to: Require all granted
  4. Check Permissions (optional): sudo chmod -R 755 /Applications/XAMPP/xamppfiles/phpmyadmin
  5. Restart Apache: sudo /Applications/XAMPP/xamppfiles/xampp restartapache
  6. Try accessing: http://localhost/phpmyadmin

🐧 Fix on Linux/Ubuntu

✅ Step-by-Step:

  1. Edit the Apache XAMPP file: sudo nano /opt/lampp/etc/extra/httpd-xampp.conf
  2. Modify this block: <Directory "/opt/lampp/phpmyadmin"> AllowOverride AuthConfig Require local </Directory> Replace with: Require all granted
  3. Fix folder permissions: sudo chmod -R 755 /opt/lampp/phpmyadmin
  4. Restart XAMPP: sudo /opt/lampp/lampp restart
  5. Open: http://localhost/phpmyadmin

⚠️ Bonus: Login Errors or Blank Page?

  • Open config.inc.php file (inside phpMyAdmin 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.


Leave a Reply

Your email address will not be published. Required fields are marked *