How to hide wp-admin page aka wp-login page in WordPress

Share this

Posted by on

Protect and hide wp-admin page

Almost, everybody knows, how to open wp-admin page of any WordPress site, Right? The default URL for visiting login page of any WordPress site is site-name/wp-admin. Well, when I was the beginner on WordPress. I wasn’t aware of these security issues. However, I realized it when my website got hacked. Trust me, it was the worst feeling ever.

Our last website was hacked due to the visibility of our wp-admin page. The wp-admin page of my last website was publicly visible. Yep, it‘s true that you can not stop the hackers from inspecting it. But, you should hide it. By setting up this security method you can not only make it more complex for hackers to crack but also you will also get an extra protection from the non-hacker communities.

The daily news of security breaches adversely challenging the security of WordPress. It has become essential to protect the wp-admin page of WordPress site. Do you want to show it to your users? No Nah? So let’s start with some useful steps to Protect and hide wp-admin page aka WordPress login page.

You can do it by the number of different ways. I’m gonna show you the best and secure ways to give it a goal.

By means of Plugins

Firstly, By means of plugins. Very frank, Plugins are the first option we search for if we want to add something new to WordPress. There are many of them which can be used to change WordPress admin page URL. If you’re a normal blog writer then it will be the best option for you because playing with codes requires practice. You just need to install the plugin from WordPress plugin repo and that’s it. Some of them which are used to Protect and hide wp-admin page are WPS Hide Login and Lockdown WP Admin. Both are good and can be installed right way. Well, I’m very friendly with lockdown wp because I’ve used it before.

How to setup Lockdown WP Admin ?

Setting up Lockdown WP admin plugin is pretty easy. However, If y’all know how to install plugins, then we should start with the setup.

After the successful installation and activation of Lockdown wp-admin plugin, we have to move to the plugin settings under the main sidebar of WordPress Dashboard.

After that, you have to check “Yes, please hide WP Admin from the user when they aren’t logged in.”  option. Change your admin URL to anything you want instead of wp-admin. Also, bullet the disable HTTP Authentication in the end and then hit the save changes button.

For more help regarding the configuration of the plugin, refer to the screenshot given below.



Modifying .Htaccess file


Protect and hide wp-admin page

icon by

Note : This method is not for absolute beginners.

Now we will see the second method i.e. modifying your .htaccess file

You can easily find your .htaccess file in your public_html folder of your database.

Please note that .htaccess file is the very important file which keeps the information on what to be accessed by outsiders. Before making any changes to your .htaccess file, please download it to your computer or any device respectively. So that if anything goes wrong in future you can replace it timelessly.

Follow the steps given below. After entering this code, the wp-admin page will be visible only if it will open from the following IP addresses. Others will get the 404 or page not found if they visit your /wp-admin page.

  • STEP 1

Login to your server dashboard. Go to your public_html folder in Cpanel & open your .htaccess file in the code editor. If it is not visible to you, Enable the option “show hidden files” under visibility and then edit it.

  • STEP 2

Add the following code at the beginning of your .htaccess file. It might be containing some codes, but you have to paste this at the beginning of every code.

Don’t forget to replace the green texts  with name and IP address of the devices (computers, laptops, smartphones) of yours. The Number of users can be increased by repeating the same code i.e. #whitelist username address. This is an easy way to deny access to your wp-admin area from hackers, intruders and visitors. However, doing this will only hide wp-admin page.


Furthermore, you should install Sucuri WordPress plugin. Sucuri is the multi-functioned high-profile security plugin which helps you to notify the every failed and success login attempts via emails. This will help you to detect the IP addresses that are trying to fake logging your site. Also, it helps to detect the malware or any malicious virus codes and clean it on time. It can be scheduled in such a way that it can check your entire website in hours, days or weeks.

It comes with a free plan to provide the basic malware security and scanning. You can also buy a premium version of this plugin for more flexibility in security. You can go on its official website to find out what it is actually and how can it protect your website.

Also, read:

If the post was useful to you and helped you in solving the issue then do not forget to share this post with your friends on Facebook or twitter. If you have any question in your mind, please feel free and type your questions in the comment. We will love to help you. Happy Blogging.

Protect and hide wp-admin page

Protect and hide wp-admin page

Last updated: June 20, 2016

Authored by :

Hi ! I'm Prakhar Shrivastav, currently a final year BSc student and a co-founder of 3nions. I love spending quality times on Web development, Graphic designing, and SEO.


Thank you for the useful article. WPS hide login is a good option, but there is also another great plugin called Theme My Login
Which is frequently updated with a security option to hide wp-admin.

Thanks for the interaction buddy. You updated my list. 🙂
Lockdown WP Admin is a also a very good plugin with updates.

Marcelo Donalds

As a veteran of a thousand psychic wars this is fabulous and is most useful! Good on Ya! for making this one! I wish you many sales as they are well deserved. For privacy what man can pay a price as that? Privacy is key

Yeah man… I appreciate to your conclusion

Nicolas Puegher

Very cool post about security, this will help me quite a lot and I know someone else who will like this, thanks for sharing 🙂

I am happy that you liked it. I will update it soon for new version of WordPress (4.5)

Great site, love the content! You explain everything very well. I’m going to implementb some of these features on my blog.

Glad you liked it @Robert

Wow I didn’t know that and yes I am new to WordPress, I will definitely look into those plugins

Yes you should, All the best!

Hey, I use WordPress and since I am still learning, this helps!

This not only helps, it is kinda essential for everyone. Security is first.

Tania Potter – Soul Sense Coaching

I had a website get hacked and then handed the whole thing over to a website guy. It is such useful information to get out there though, there is a lot to be aware of in the online world.


Yikes! I’m fairly new to blogging and had never even thought of this. I guess I’ll be downloading the plugin you suggested!

Leave a Reply