How To Block A WordPress User Without Deleting His Account?

Rifat WordPress Tutorials Nov 28, 2023

Due to some unpleasant behaviours, you might need to block a user occasionally. Have you ever considered doing that?

Your initial thought is probably to delete the user's account. However, you will lose the user's material.

If you accept guest postings and discover after a few days that the user is engaging in criminal activity, you will naturally consider terminating the account.

You should block a WordPress user without removing his account rather than deleting the content.

Create Amazing Websites

With the best free page builder Elementor

Start Now

You are going to learn the simplest technique to complete this task in this lesson.

Why Blocking is Better than Deleting User?

By simply cancelling their user account, you can restrict users on your WordPress website with the utmost ease.

Nevertheless, in order to delete a user account in WordPress, you must transfer all of their material to another user. This will alter the articles' author information.

Changing the user's password and email address by updating their user profile is one solution to this problem. As a result, they won't be able to log in and their access will be blocked. But it will also alter their Gravatar picture.

On multi-author blogs, forums, and community websites, having the option to disable a user without deleting their account is very useful.

Let's now examine how to quickly block a WordPress user without erasing their user account.

Blocking a User by Downgrading Their Role

You can give each user a different role using the robust user management system that comes with your WordPress website.

Downgrading a WordPress user's role is one approach to block them. This will limit what they can do after they get in, but it won't prevent them from accessing your WordPress website. Use Methods 2 or 3 in its place if you don't want them to be able to log in at all.

Downgrading the User Role to Subscriber

The user's role could be changed to Subscriber. They will have restricted access to the WordPress admin area once they log in. Their only control will be over user preferences like name and admin colour scheme.

However, if the individual has posted on your website, this could be a problem. They can alter their name to something derogatory if they wish to cause trouble; this will cause their offensive name to appear in all of their posts on your website.

Downgrading the User Role to ‘No Role for This Site’

'No role for this site' is a preferable role to assign to users you want to block.

They won't be taken to the admin section after logging in. If they attempt to navigate there, an error notice explaining that they lack access will be displayed.

Go to your admin area's Users » All Users page first.

Then you must click the 'Edit' link next to the user whose account you want to block.

You must now go down to the "Role" setting and click the drop-down menu next to "No role for this site" to make your selection.

Then, to save your settings, click the "Update User" button at the bottom of the page.

On your WordPress website, the user won't be able to access any admin settings anymore.

Simply repeat these procedures to assign the user their former role if you ever want to unblock them.

Blocking a WordPress User With the Lock User Account Plugin

Using the ProfilePress plugin, a WordPress user registration, login form, and premium membership plugin, is one approach to restrict a user in WordPress. The User Moderation plugin is also included, which enables you to block and unblock users as necessary.

Go to ProfilePress > Addons > User Moderation to activate the plugin. Turn on User Moderation by scrolling to it.

You will receive an email notification after activating the add-on about each user registration, and you can decide whether to accept or reject the user. Additionally, brand-new user accounts will be in the pending state up until you accept or reject them.

Now we will see how to block a user in WordPress using the User Moderation addon:

Log into your WordPress dashboard and select Users > All Users.

To block or unblock a user, locate them and hover over their username.

Click the Block button on the user's action buttons.

The user's access to your website will now be prohibited. Although they won't be able to log in or view any of the material on your website, they will still have an active account.

It's crucial to keep in mind that when you block a person in this fashion, they will be made aware of the situation.

Follow the same procedures as above and click "Unlock" to unblock a user. The user can now visit your website again.

Wrapping Up

Blocking a user can be a useful alternative to deleting their account entirely. This allows you to restrict their access without losing their account data. The techniques covered in this post, like restricting author access and using a plugin like ProfilePress plugin, make it easy to quickly block a user's ability to log in or make comments. With a few simple steps, you can stop disruptive behavior without resorting to a permanent account deletion. Implementing blocking early can prevent small issues from escalating and preserve your community's constructive contributions. Overall, blocking gives you more flexibility to moderate your site without losing user data.

Divi WordPress Theme