How to Limit WordPress Dashboard Access

Download Now: Free WordPress Website Guide + Checklist
Anna Fitzgerald
Anna Fitzgerald

Updated:

Published:

The WordPress admin dashboard is the control panel for your entire website. It’s where you manage your content, settings, plugins, activity, and basically anything else you can think of.

person limiting wordpress dashboard access for users

In other words, your dashboard is the key to the kingdom so you have to be selective about who you give access to.

There are a number of reasons why you might want to limit other users’ access to your WordPress dashboard. Say you’re running a blog. You might want to give limited access to writers so they can create and edit posts without changing your theme, plugins, or other settings. You might also want to block subscribers from accessing your dashboard entirely.

Whatever the reason, you have a few options for restricting access to your WordPress dashboard. In this post, we'll show you how.

Download Now: How to Launch a WordPress Website  [Free Guide + Checklist]

We’ll discuss each of these methods in detail below so you can choose the one that best meets the needs of your WordPress site.

Limit Dashboard Access With User Roles and Permissions

WordPress’s user roles define who can and can’t do what on a WordPress site. Different roles come with different capabilities, or actions they’re allowed to perform. Site owners assign user roles to control who is able to write and edit posts, create pages and categories, moderate comments, manage plugins and other users, customize the site’s theme and settings, and more.

A simple way to limit access to your dashboard is to set the default role for new users as “Subscriber” in the General Settings section. As the most limited role, subscribers are only able to read content on the frontend of your site and manage their own profiles.

A simple way to limit access to your dashboard is to set the default role for new users as “Subscriber” in the General Settings section of your WP dashboard

Source

After setting this default role for new users, you still might need to review and change the roles of your existing users. To do so, navigate to Users > Find User. Click Edit and then select the role you want to assign them from the dropdown menu.

In WP dashboard, navigate to Users > Find User and click Edit to change the roles of existing users

Source

The administrator role allows a user to perform all possible capabilities. An editor is the next most powerful, then an author, contributor, and subscriber.

If you run a multi-author blog, assigning user roles is an excellent solution for limiting access to your dashboard. If you have a smaller site, you may not need to make so many distinctions among your users. In that case, check out the next solution.

Limit Dashboard Access With Code

If you run a membership site in which visitors sign up and pay for access to all your content, then you’ll still want to block their access to your dashboard. It’s a security protocol but, more importantly, it will help ensure that your members have a great visitor experience on your site. Imagine how confusing it would be for them to log in to your site and land on the dashboard instead of the homepage.

To block all users except admins from your dashboard, just add the following code at the end of your functions.php file.

  add_action( 'init', 'blockusers_init' ); function blockusers_init() { if ( is_admin() && ! current_user_can( 'administrator' ) && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { wp_redirect( home_url() ); exit; } } 

Now only admins will be able to access your dashboard. All other users will be redirected to the homepage after logging in.

If you are looking for more options to categorize users as admins versus non-admins but don’t want to manually change the roles of your users, then you can use a plugin. It will automate the process of limiting your dashboard access.

Limit Dashboard Access With a Plugin

Using a plugin has a few advantages over the other two options. It allows you to easily restrict access to user roles or users with specific capabilities and redirect other users to another web page. As a result, only trusted users will be able to access your WordPress Dashboard.

To easily and quickly limit dashboard access, you can use the Remove Dashboard Access. It’s free and easy to use. Once installed and activated, just go to Settings > Dashboard Access to configure the plugin.

You can limit dashboard access by role — choosing administrators only, editors and admins, or authors, editors, and admins — or by capability. Next, choose a URL to redirect restricted users to any page on your website. When you’re ready, just click on the save changes button to store your settings.

Go to Settings > Dashboard Access to configure the Remove Dashboard Access plugin

Source

You can use any of the above methods to strategically share and limit access to your WordPress dashboard. This will help you manage the security of your site and provide every type of user with a seamless experience.

wp

 

Related Articles

Launch your WordPress website with the help of this free guide and checklist.

    CMS Hub is flexible for marketers, powerful for developers, and gives customers a personalized, secure experience

    START FREE OR GET A DEMO