How To Fix 401 Unauthorized Error wordpress on DigitalOcean
My previous tutorials was “How to create a website on DigitalOcean in a minutes” after installing wordpress , browser ask you admin user & password. well you can find the user namd and password by command:
cat /root/WORDPRESS
But this is a solution to complete the wordpress initial setup page. but every time when you will try to visit wordpress admin area browser will ask admin user & password.
its simple to fix the problem , log into your droplet via the command line, and run :
nano /etc/apache2/apache2.conf
Now, 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>
here is a example ,screen shot:
Press “Enter” to save the .conf file. Its done.
my hoster made /wp-admin/ not accessible at all = 403 allways
god bless Digital Ocean 😉
🙂