By bobwheeler
When I click on login for Wordpress I get a login box saying, A username and password are being requested by http://xyz.com. The site says: “Restricted Area”. I have to enter the original login info for admin. How do I make this go away?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi,
I do not have this section in my /etc/apache2/apache2.conf file. I keep getting the login prompt on my sites. There must be settings to change somewhere else…
<DirectoryMatch ^.*/wp-admin/>
AuthType Basic
AuthName "Please login to your droplet via SSH for login details."
AuthUserFile /etc/apache2/.htpasswd
Require valid-user
</DirectoryMatch>
The password prompt is added for additional security on the WordPress admin page. You can disable it by editing /etc/apache2/apache2.conf From the full tutorial, One-Click Install WordPress on Ubuntu 14.04 with DigitalOcean:
To remove the additional password prompt, you’ll need to log into your VPS instance through SSH… Once logged in, you need to update the main Apache configuration file. Open it as root with your text editor:
nano /etc/apache2/apache2.conf
Inside, you need to find the section that deals with the “/wp-admin/” section. It should look like this
<DirectoryMatch ^.*/wp-admin/>
AuthType Basic
AuthName "Please login to your droplet via SSH for login details."
AuthUserFile /etc/apache2/.htpasswd
Require valid-user
</DirectoryMatch>
This entire section can be commented out by placing the “#” character before each line, like this:
#<DirectoryMatch ^.*/wp-admin/>
# AuthType Basic
# AuthName "Please login to your droplet via SSH for login details."
# AuthUserFile /etc/apache2/.htpasswd
# Require valid-user
#<DirectoryMatch>
Once this is complete, you can restart Apache for your new changes to take affect.
service apache2 restart
This should remove the additional password prompt from the administrative areas, which is usually okay since WordPress itself can handle authentication.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.