You are currently viewing How To Fix 401 Unauthorized Error wordpress on DigitalOcean

How To Fix 401 Unauthorized Error wordpress on DigitalOcean

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:
wordpress

Press “Enter” to save the .conf file.  Its done.

Jobair Alam Bipul

I'm Jobair Alam, a cPanel Certified WHM/cPanel server administrator and web hosting expert with over 10 years of experience in the industry.

This Post Has 2 Comments

  1. sweb user

    my hoster made /wp-admin/ not accessible at all = 403 allways
    god bless Digital Ocean 😉

    1. admin

      🙂

Leave a Reply

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

HostArmada - Affordable Cloud SSD Web Hosting