Protect phpMyAdmin using Apache (.htaccess)
✅ Protect phpMyAdmin using Apache (.htaccess)
Step 1: Enable Apache auth modules (usually already enabled)
Step 2: Create a password file
Open Command Prompt as Administrator
cd C:\xampp\apache\binCreate password file
htpasswd -c C:\xampp\phpMyAdmin\.htpasswd adminhtpasswd C:\xampp\phpMyAdmin\.htpasswd user2Step 3: Create .htaccess in phpMyAdmin folder
.htaccess in phpMyAdmin folderStep 4: Allow .htaccess overrides
.htaccess overridesStep 5: Restart Apache
🎉 Result
Last updated