With time WordPress has grown into a bigger and customizable content management system – thanks to the constant self-reinventions. In fact, WordPress perfectly-suited my need to set up an elegant, easy-to-manage and robust website. But, regardless of the great features WordPress, securing my site from brute-force attacks have always been a major concern for me, especially when I need to provide my users access to the WordPress website admin panel (or login page).
Hide Your WordPress Admin Login Page

Luckily, there are some viable means that helps in making WordPress powered sites secure, by hiding the admin login page from users.

Through this post, I intend to help you better understand different ways using which, you can hide the WordPress admin panel of your site or blog from your users.

1. Blocking Access to WordPress Admin Panel With Code

Often when creating a membership site, you'll most likely need to create multiple user levels. And your users will need to access the site admin panel. But, what if the admin panel is not customized for user experience? In that case, you will certainly don't want your users have access to the WP-admin panel. Instead, you can put all the necessary things on the front-end such as the option to edit profile page and others. For this purpose, you can use a WordPress plugin that let your visitors get logged-in into your website and access things on the front-end. However, this often creates two problems:

#Problem 1: When viewing the site, the admin bar won't go away that may prove distracting for users.
#Problem 2: Users may attempt to access http://sitedomain.com/wp-admin/. Though the page won't open, but it might look unprofessional in some cases.

Let us now look at the solution that requires you to add the following code in your theme's functions.php file:


 * Disable admin bar from the site's front-end 

 * for users who have subscribed to your admin login page


function themeblvd_disable_admin_bar() { 

 if( ! current_user_can('edit_posts') )

  add_filter('show_admin_bar', '__return_false'); 


add_action( 'after_setup_theme', 'themeblvd_disable_admin_bar' );



 * Redirect back to homepage and block access to 

 * WP admin for subscribed users.


function themeblvd_redirect_admin(){

 if ( ! current_user_can( 'edit_posts' ) ){

  wp_redirect( site_url() );




add_action( 'admin_init', 'themeblvd_redirect_admin' );

As you can see, the code is divided into two different parts. The first part provides solution to the our first problem (refer to #Problem1), and make sure that if the user has signed into the site, but cannot perform edits on the site, then hide the admin bar from your website front-end. The second part of the code resolves the other problem (refer to #Problem2) and block access to the WordPress admin panel for logged-in users who can't edit the site.

2. Using WordPress Plugins To Hide Admin Panel

One of the easiest ways (especially for a rookie) is to make use of a suitable plugin that helps to hide the WP-admin panel. Below is a list of three of the best plugins you can use to accomplish this task:

Lockdown WP Admin

Lockdown WP Admin

Lockdown WP Admin is one of the best WP plugin that helps strengthen the security of your website from intruders. This plugin hides the admin and login page from the user isn't logged-in. In case a non-logged in user tries to access the admin panel directly, a 404 error will be returned.

What's more? This plugin enables you to change the default login URL of WordPress admin login page. And thus, unable hackers from accessing your admin login form, and thereby avoid them from attempting to break-into your admin area by guessing your password. This plugin works with WordPress version 3.6 or greater.

Hidden WP Admin

Hidden WP Admin

Hidden WP Admin is an incredibly useful plugin for you if you want to hide your website admin login page or sign-up page from all users, except for the ones to whom you want to provide access to the admin area.

This is a free WordPress plugin that enables you to allow multiple sign-ups on your site, but only provide access to the admin area to users with certain capabilities. This eventually helps you secure your site from being accessed by malicious users. The Hidden WP Admin plugin is compatible with WordPress version 3.5 and higher.

Hide Login+

Hide Login+

Are you looking for a plugin that helps to secure the admin and login page of your blog? Then, Hide Login+ is exactly what you need. It helps in creating custom slugs (URLs) for WordPress website registration, login, logout, and other important URLs.

The best aspect about this plugin is that it also gives the custom redirection ability to make changes to the admin login page, besides the pre-defined options. The plugin can be installed in WordPress version 2.3 or higher.

Let's Wrap Up!

There may be situations when you would like to hide your WordPress website admin login page from your users. Most importantly, it helps to keep your site secure from being attacked by malicious users. This post outlines two different ways to make the WP-admin panel hidden from the users.

You can hide the admin panel manually, by adding a code in your theme's functions.php file or choose a plugin. However, most of us have a tendency to take an easier route to solve our problems, and thus will probably search for a plugin to accomplish our objective.

But, if you want a more personalized approach and having coding skills, I'll recommend you to use the code and tailor it according to your own needs.

Sarah Parker

Sarah Parker is an well known WordPress developer associated with Markupcloud Ltd, a PSD to WordPress service provider company. She loves to share his knowledge regarding HTML, CSS , Wordpress and many more .

Post a Comment