By Loading
Hi,
My site is very popular, so there are haters who try to login by tying passwords on wp-login page.
All I want to do is protect wp-admin & wp-login like this : http://i.imgur.com/xZrOEiC.png
So that, after passing above authentication, I may go to wp-login page.
Please help me to do so.
Regards
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!
In order to password protect a page with Apache, you need to add a new section to your Apache VirtualHost like the below:
<DirectoryMatch ^.*/wp-admin/>
AuthType Basic
AuthName "Restricted"
AuthUserFile /etc/apache2/.htpasswd
Require valid-user
</DirectoryMatch>
Then set the user and password by running:
sudo htpasswd -c /etc/apache2/.htpasswd username
Finally, restart Apache for the changes to take effect:
sudo service apache2 restart
Check out this article for more information:
Hello, all
There are plugins that can change the default admin page from domain.com/wp-admin and also make the admin page inaccessible via the PHP file domain.com/wp-login.php. This can also be achieved using Apache or Nginx rewrite rules, but for not so technically advanced users a plugin will do the job just as well as using a rewrite rule.
Regards, Alex
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.