Beginner's Guide for WordPress / Start your WordPress Blog in minutes

How to Block a WordPress User Without Deleting Their Account

Do you want to block a WordPress user from your blog?

The simplest way to achieve this is to delete their user profile, but this will remove them completely from your site.

In this article, we will show you how to block or disable a WordPress user without deleting their account.

How to Block a WordPress User Without Deleting Their Account

Why You Shouldn’t Delete a User Account

The easiest way to block a user on your WordPress website is by simply deleting their user account. However, deleting a user account in WordPress requires you to assign all their content to another user. This will change the author information for those articles.

One way to deal with this issue is to change the user’s password and email address by editing their user profile. This will block their access, and they will not be able to log in. However, this will also change their Gravatar image.

The ability to disable a user without deleting their account is especially helpful on multi-author blogs, forums, as well as community sites.

Let’s take a look at how you can easily block a WordPress user without deleting their user account. We’ll cover three methods:

Method 1: Blocking a User by Downgrading Their Role

Your WordPress website comes with a powerful user management system that allows you to assign different roles to each user.

One way to block a WordPress user is to downgrade their role. This won’t stop them from logging in to your WordPress site, but it will restrict what they can do after they log in. If you don’t want them to be able to log in at all, then you should use Method 2 or 3 instead.

You could downgrade the user’s role to Subscriber. Once they log in they will be given limited access to the WordPress admin area. They’ll only be able to change their user settings such as their name and admin color scheme.

Users With the Subscriber Role Have Very Limited Admin Access

However, this can be a problem if the user has written posts on your site. If they want to cause trouble, then they can change their name to something offensive and it will be displayed on all of their posts on your website.

A better role to give users you wish to block is ‘No role for this site’. When they log in they will not be directed to the admin area, and if they try to navigate there, then they will be shown an error message stating that they don’t have access.

Users With 'No Role For This Site' Have No Admin Access

First, head over to the Users » All Users page of your admin area. Next, you need to click the ‘Edit’ link under the user you wish to block.

Edit the User from the Users » All Users Page

Now you need to scroll down to the ‘Role’ setting and select ‘No role for this site’ from the drop down menu. After that, you should click the ‘Update User’ button at the bottom of the page to store your settings.

Assign the Role 'No Role for This Site'

The user will no longer be able to access any admin settings on your WordPress website.

If you wish to unblock a user in the future, then simply follow the same steps to assign them their previous role.

Method 2: Blocking a User With Lock User Account

The first thing you need to do is install the Lock User Account plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Lock User Account is a light plugin that does just one job. Upon activation, you are ready to block users so they can’t log in to your website.

Start by navigating to the Users » All Users page of the admin dashboard. Once there, you should click the checkbox next to every user you wish to block.

Select 'Lock' From the Bulk Actions Menu

Next, simply click the ‘Bulk actions’ button and select ‘Lock’ from the menu, and then click the ‘Apply’ button.

Next time these users try to log in, they will be blocked and see the error message ‘Your account is locked!’

Locked Users Are Unable to Log In

If you wish to unblock the user in the future, then simply follow the same steps but choose ‘Unlock’ from the Bulk Actions menu.

Method 3: Blocking a WordPress User WP Cerber Security

The first thing you need to do is install the WP Cerber Security plugin. For more details, see our step by step guide on how to install a WordPress plugin.

WP Cerber Security offers many WordPress security features including the ability to block certain users so they can’t log in.

Upon activation, you should navigate to the Users » All Users page on your dashboard. Next, you should click the ‘Edit’ link under the user you wish to block.

Edit the User From the Users » All Users Page

On the next page, you need to scroll down to the ‘Block User’ setting and then click the checkbox. After that, you should click the ‘Update User’ button at the bottom of the page to store your settings.

Click the 'Block User' Checkbox

You have now blocked the user and they are unable to log in to your website. If you wish to unblock them in the future, then follow the same steps and uncheck the ‘Block User’ box.

Blocked Users Are Unable to Log In

Like the Lock User Account plugin, WP Cerber Security allows you to block multiple users at once. Once you have navigated to the Users » All Users page, simply check the box next to every user you wish to block.

After that, you need to click the ‘Bulk actions’ button at the top or bottom of the screen and select ‘Block’ from the drop down menu.

Select 'Block' From the Bulk Actions Menu

Once you click the ‘Apply’ button, the selected users will not be able to log in to your WordPress site.

We hope this tutorial helped you learn how to block a WordPress user without deleting their account. You may also want to see our ultimate WordPress security guide, or check out our list of the most common WordPress errors and how to fix them.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit – a collection of WordPress related products and resources that every professional should have!

Reader Interactions

20 CommentsLeave a Reply

  1. I used No Role to temporarily remove a web dev from Admin access as we only wanted one web dev at a time to access our site. But after changing her role from Admin to No Role, her styling edits were lost. It seems that some work can be lost if you change someone from Admin to No Role.

  2. Is there a way to block a user depending on wether or not they have an active subscription to woocommerce subscriptions on my site?

    • For blocking based on a subscription to a different plugin, you would want to reach out to that different plugin’s support for what integrations they have available.

      Admin

    • You would want to reach out to the plugin’s support and they would let you know if there is the option to bulk unblock users or if it is a planned addition in the future.

      Admin

  3. Useful plugin. Is it possible to block a user with a login count? i.e. username1 and username2. username1 should be blocked once he reached the login count 50. And username2 should be blocked once he reached the login count 30. Login count is also like date and time – it should be defined by admin. Pls, help.

    • We do not have a recommended method for that at the moment. For a starting point, you may want to reach out to the plugin’s support to see if they have a plan for adding that at the moment.

      Admin

    • It should be, but if you are concerned you can reach out to the plugin’s support to see if there are any known issues.

      Admin

  4. Will it display the block message to blocked users when using custom login page?

    Thanks

    • As long as your custom login page displays errors it should show the message but you would want to reach out to the plugin’s support for confirmation on if it works with your setup

      Admin

  5. Please i want to create a site whereby people will post on my site and they will earn through the post they’ve posted on my site

    Please what’s type of site is that and what plugins and themes is more suitable for that site

    And Please I am using WordPress to create this type of site

    I am sorry that I didn’t comment and post on the right page

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.