Facebook-f X-twitter
EncodeByte
Need Help!
  • How-To
    How-ToShow More
    How To Redirect Old Website To New Domain Without Losing SEO | 301 Domain Redirect
    By
    Franchbabu
    How to Fix the “Windows Cannot Be Installed to This Disk” Error
    By
    EncodeMore
    How to Check Your Laptop’s Battery Health: A Step-by-Step Guide
    By
    EncodeMore
    How to Become a Freelancer in 2025: A Comprehensive Guide.
    By
    EncodeMore
    How to Activate Windows Legally and For Free (100% Working)
    By
    EncodeMore
  • Web Development & Coding
    Web Development & CodingShow More
    How to Become a Freelancer in 2025: A Comprehensive Guide.
    By
    EncodeMore
    What Are the Top In-Demand Freelancer Niches Predicted for 2025?
    By
    EncodeMore
    🚀 10 Reasons Why Hostinger Is the Best Web Hosting Platform for Speed, Security & Affordability
    By
    Franchbabu
    How to Add “Made with ❤️” to Your WordPress Footer (No Plugin Needed)
    By
    EncodeMore
    WordPress Redirect After Login: How to Set It Up
    By
    EncodeMore
  • Code Snippets & Scripts
    Code Snippets & ScriptsShow More
    How to Hide a Class in WordPress (Easy CSS & Admin Tips)
    By
    EncodeMore
  • Website Design & UX
    Website Design & UXShow More
    10 Web Design Mistakes That Are Killing Your User Experience (and How to Fix Them)
    By
    Franchbabu
  • Make Money Online
    Make Money OnlineShow More
    How to Become a Freelancer in 2025: A Comprehensive Guide.
    By
    EncodeMore
    What Are the Top In-Demand Freelancer Niches Predicted for 2025?
    By
    EncodeMore
    Website related skillsets that you shoud have
    By
    EncodeMore
    Top Sites Like Fiverr: The Best Fiverr Alternatives for Freelancers
    By
    Franchbabu
    Best Telegram Channels For Free Paid Courses
    By
    Franchbabu
  • 🤩 Trending:
  • How-To Guides
  • WordPress & Website Development
  • Web Development & Coding
  • Windows & Software Fixes
  • Tech Tips, Tools & Tutorials
  • Computer Tips & Tricks
Font ResizerAa
EncodeByteEncodeByte
Search
  • How-To
  • Web Development & Coding
  • Code Snippets & Scripts
  • Website Design & UX
  • Make Money Online
Follow US
Made by ThemeRuby using the Foxiz theme. Powered by WordPress
WordPress & Website DevelopmentHow-To Guides

How to Limit WordPress Dashboard Access

Last updated: May 3, 2023 8:50 pm
By
Franchbabu
Share

How many people would you give your house keys to and let them do anything they want? The same can be stated of your WordPress dashboard and its various users.

Contents
Why Limit Dashboard Access?How to Manage or Limit Dashboard Access with User Roles & PermissionsLimit Dashboard Access With CodeLimit Dashboard Access With a Plugin

If you thought of your WordPress website as your online home, you wouldn’t want just anyone going through all of your drawers.

This article will show you some of the simplest ways to limit access for WordPress users by utilizing code in the functions.php file, making modifications in the admin area, or using plugins.

Why Limit Dashboard Access?

The WordPress admin area should only be accessible to those you trust. If you manage a blog with multiple authors, for example, you should grant access to contributors and editors but not to subscribers.

You may still control what people can and cannot see on the dashboard even if you’ve given them access to your admin section.

How to Manage or Limit Dashboard Access with User Roles & Permissions

To limit access, go to Settings > General. Then set any New User Default Role as a Subscriber. You can also change the roles of any user that has access to your website at any time. So, any existing user roles can be modified under Users > All Users.

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.

Then how do roles in WordPress differ from one another? Here are a few possibilities for roles in WordPress:

  • Admin/Super Admin:It enables access to all functions on one website, including network administration features. Only multisite supports the Super admin role.
  • Editor: Users who can manage & publish posts, including the posts of other WordPress users.
  • Author: Users who can manage & publish their posts.
  • Contributor: Allows a user to write & manage their posts but not publish them.
  • Subscriber: As mentioned above, it’s very limited. It only allows users to manage their profiles.

Since each role has specific abilities, you can easily adjust and switch between them as necessary.

Limit Dashboard Access With Code

Another way to manage and control user access is with code. You can use the following code in your child themes 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; } } 

This prevents non-administrators from accessing the backend of your WordPress website. Only administrators have access, while all other users are sent to the home page.

This code is only active when the user is logged into the WordPress dashboard. The code will not be applied to any user who is not logged in because they will not have access to the WordPress dashboard.

Limit Dashboard Access With a Plugin

WordPress plugins provide several advantages over other methods for limiting users, and they are also simpler to utilize.

A well-known WordPress plugin that can help you restrict access to your WordPress dashboard is briefly described here.

To easily and quickly limit dashboard access, you can use the Remove Dashboard Access.

It is simple to use and free. Simply navigate to Settings > Dashboard Access to configure the plugin after it has been installed and activated.

Any of the strategies listed above can be used to strategically distribute and limit access to your WordPress dashboard. This will assist you in managing your site’s security and providing a seamless experience to all types of users.

Share This Article
Facebook Whatsapp Whatsapp LinkedIn
Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Popular Categories

Themes & Customization

1 Article

Troubleshooting & Fixes

1 Article

WordPress Tips & Tricks

6 Articles

WordPress Tutorials

5 Articles

Must Read

How-To GuidesSEO Tips & StrategiesWordPress Tutorials

How To Redirect Old Website To New Domain Without Losing SEO | 301 Domain Redirect

WordPress & Website DevelopmentHow-To Guides

How to Create a Private/Password Protected Post or Page in WordPress

Computer Tips & TricksHow-To Guides

How to Repair a Bad Hard Disk (Hard Disk Low Level Format)

How-To GuidesTech Tips, Tools & Tutorials

How to Remove URLs From Google Search

  • I need help with …

Starting a Blog

WordPress SEO

WordPress Performance

WordPress Errors

WordPress Security

Got A Question?

Need Expert Help?
Let CodeXcool power up your website with
custom WordPress design, speed optimization, and SEO!
🚀 Get Started

You Might also Like

How-To GuidesCode Snippets & ScriptsWordPress Tips & Tricks

How to Hide a Class in WordPress (Easy CSS & Admin Tips)

WordPress & Website DevelopmentHow-To Guides

How To fix 404 errors caused by permalinks in WordPress?

How-To GuidesWordPress & Website Development

How to Protect the wp-content Folder of Your WordPress Website? A Step By Step Guide.

How to Stop Spam on Your WordPress Website For Good

EncodeByte

© 2025 EncodeByte – Discover expert tech tutorials, coding guides, troubleshooting solutions, and free tools. Simplify technology, build smarter, and learn faster with us.

About Us / Privacy Policy / Contact Us

Latest News

  • Coming Soon
  • Coming Soon
  • Coming Soon
  • Coming Soon

Services

  • Coming Soon
  • Coming Soon
  • Coming Soon
  • Coming Soon

Looking for custom web development or maintenance?

Check out our parent team at [CodeXcool.com] 🚀
— Let's build together!
Request a Quote
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?